Answer to Question #50399 in C++ for zexy

Question #50399
Create a class named Car. The Car class contains a static integer field named count. Create
a constructor that adds 1 to the count and displays the count each time a Car is created.
Create a destructor that subtracts 1 from the count and displays the count each time a
Car goes out of scope. Write a main()function that declares an array of five Car objects.
Output consists of five constructor messages and five destructor messages, each displaying
the current count
1
Expert's answer
2015-01-13T11:17:13-0500
The answer to the question is available in the PDF file https://www.assignmentexpert.com/homework-answers/programming-answer-50399.pdf

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS