1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
sladkih [1.3K]
3 years ago
12

BOTH QUESTIONS ONLY FILL IN C++ CODEWrite a copy constructor for CarCounter that assigns origCarCounter.carCount to the construc

ted object's carCount. Sample output for the given program:Cars counted: 5Sample program:#include using namespace std;class CarCounter { public: CarCounter(); CarCounter(const CarCounter& origCarCounter); void SetCarCount(const int count) { carCount = count; } int GetCarCount() const { return carCount; } private: int carCount;};CarCounter::CarCounter() { carCount = 0; return;}// FIXME add copy constructorvoid CountPrinter(CarCounter carCntr) { cout << "Cars counted: " << carCntr.GetCarCount(); return;}int main() { CarCounter parkingLot; parkingLot.SetCarCount(5); CountPrinter(parkingLot); return 0;}QUESTION #2!!!!!!!!!!!!!!!!_______________----------------------------------------------_______________________________Overload the + operator as indicated. Sample output for the given program:First vacation: Days: 7, People: 3Second vacation: Days: 12, People: 3Sample program:#include using namespace std;class FamilyVacation{ public: void SetNumDays(int dayCount); void SetNumPeople(int peopleCount); void Print() const; FamilyVacation operator+(int moreDays) const; private: int numDays; int numPeople;};void FamilyVacation::SetNumDays(int dayCount) { numDays = dayCount; return;}void FamilyVacation::SetNumPeople(int peopleCount) { numPeople = peopleCount; return;}// FIXME: Overload + operator so can write newVacation = oldVacation + 5,// which adds 5 to numDays, while just copying numPeople. void FamilyVacation::Print() const { cout << "Days: " << numDays << ", People: " << numPeople << endl; return;}int main() { FamilyVacation firstVacation; FamilyVacation secondVacation; cout << "First vacation: "; firstVacation.SetNumDays(7); firstVacation.SetNumPeople(3); firstVacation.Print(); cout << "Second vacation: "; secondVacation = firstVacation + 5; secondVacation.Print(); return 0;}
Computers and Technology
1 answer:
Alborosie3 years ago
4 0

Answer:

im lost tell me a question then ill answer

Explanation:

You might be interested in
This site isn't letting me add my ans and wut should I do?
kodGreya [7K]
You can probably refresh or log out or something.
4 0
3 years ago
Researching the history of computers is a good troubleshooting technique.<br> True or False?
Verdich [7]

Yes very much so! You could learn previous mistakes/bugs/etc and find solutions to fixing them and avoiding getting them. As well as much more. History is always a fun subject for anything, really in my opinion.

4 0
3 years ago
As a photographer, what will be the driving force behind everything that you produce?
GREYUIT [131]

Answer:

You have to like it to be successful in photography.

Explanation:

8 0
3 years ago
Enter the cube's edge: 4<br> The surface area is 96 square units.<br> Python
mr_godi [17]

Answer:

See the program code below.

Explanation:

def cube_SA(edge):

 edge = int(input("Enter the cube's edge: "))

 sa = edge * edge * 6

 print("The surface area is {} square units".format(sa))

cube_SA(4)

Best Regards!

5 0
3 years ago
Draw the final structure that will house the electronic system​
Natasha_Volkova [10]

Answer:

1. TECHNOLOGY GRADE 9 TERM 3. In this chapter, you will revise the work you did on electrical systems and control

Explanation:Circuits can be found in just about every electronic device you ... An electric circuit is in many ways similar to your circulatory system

4 0
3 years ago
Other questions:
  • What udp port is used for i k e traffic from vpn client to server?
    14·1 answer
  • Display flight number, origin, destination, fl_orig_time as --"Departure Time", fl_dest_time as "Arrival Time". Format times in
    8·1 answer
  • What is the order of arrangement of files and folders on a computer?
    15·1 answer
  • When you hack a website, do you enter in the master code in the html section code data, or the offline/online system?
    14·1 answer
  • Two technicians are discussing shielded cable. Technician A says that shielded wires are generally twisted in pairs to cancel th
    14·1 answer
  • ____ are programs that need to be attached to other files to install themselves on computers without the users’ knowledge or per
    5·1 answer
  • What is a good analogy for explaining the actions of a compiler?
    10·1 answer
  • Mainframe computers are multi-programming, high-performance computers, and multi-user, which means it can handle the workload of
    7·2 answers
  • The following statements regarding centralized administration concepts are presented to you in an interview in which only one of
    5·1 answer
  • Which program assesses and measures improper medicare fee-for-service payments (based on reviewing selected claims and associate
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!