subject

- The ParkedCar Class: This class should simulate a parked car. The class's responsibilities are as follows: - To know the car's make, model, color, license number, and the number of minutes that the car has been parked. - The ParkingMeter Class: This class should simulate a parking meter. The class's only responsibility is as follows: - To know the number of minutes of parking time that has been purchased. - The Parking Ticket Class: This class should simulate a parking ticket. The class's responsibilities are as follows: - To report the make, model, color, and license number of the illegally parked car - To report the amount of the fine, which is $25 for the first hour or part of an hour that the car is illegally parked, plus $10 for every additional hour or part of an hour that the car is illegally parked - To report the name and badge number of the police officer issuing the ticket - The PoliceOfficer Class: This class should simulate a police officer inspecting parked cars. The class's responsibilities are as follows: - To know the police officer's name and badge number - To examine a ParkedCar object and a ParkingMeter object, and determine whether the car's time has expired - To issue a parking ticket (generate a ParkingTicket object) if the car's time has expired Write a program that demonstrates how these classes collaborate. Make the aforementioned classes nested classes within the class containing your main method; only this outermost class can be declared public.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:10
Technician a says that if a valve is open when a piston rises to the very top of a cylinder, the piston may actually strike the valve head and cause serious engine damage. technician b says if the camshaft is located in the engine block, then the engine is called an overhead valve engine, ohv engine, or an in-block camshaft. who is right? a. b only b. both a and b c. a only d. neither a nor b
Answers: 3
question
Computers and Technology, 22.06.2019 10:40
Program using c++ only on visual studio pig is a simple two player dice game, played with one die. the first player to reach or surpass 50 is the winner. each player takes a turn rolling the dice. they add to the pot with each roll, having to decide to roll again and increase the pot, or cash out. the risk being they could lose the amount they’ve accumulated into the pot. the rules for each player’s die roll. 1. roll the dice. a. if user rolled a 1, i. the pot gets set to zero ii. the other player goes to step 1. b. a roll of 2-6 is added to the pot. 2. user can choose to hold or roll again. a. choice roll. return to step 1. b. choice hold. i. increment player score by the pot amount. ii. pot gets set to 0. iii. second player gets to roll and goes to step 1. program requirements: ● before each opponent begins ○ output the score for the person and the computer. ○ output the opponents whose turn is beginning and ask the user to hit enter to continue. ● with each dice roll. ○ output the die value, and amount of the round pot. ○ if it’s the users roll ask if they want to roll again ( r ) or hold ( h ). your program should allow r, r, h or h as valid input. if input is anything else, ask the user again until valid input is obtained. ○ the ai will continue playing until the round pot is 20 or more. ● once a player’s score is greater or equal to 50 then they have won, it will no longer ask if they want to keep rolling the die or not. ● once there is a winner ○ score totals are output along with who the winner was. user or computer ○ player is asked if they want to play again y or n. valid input should be y, y, or n, n. ● when a new game starts the starting roll goes to the player that did not roll last. if the user rolled last in the previous game, then the computer rolls first and vice versa. when the program first begins, the player will make the first roll of the first game. development notes : ● you will need a way to roll dice in your program. the rand() function works well, but returns an integer. if we want numbers 0 – 9 we can get the value modulus 10. ● call srand() with a value to seed it. it’s common to seed it with the current computer clock, include ctime, and then call srand(time(
Answers: 1
question
Computers and Technology, 22.06.2019 20:00
The blank button automatically displays next to the data when you select a range of numeric data which is an available option for creating a chart
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
Which of these is a benefit of using objects in a powerpoint presentation? a. collaborators can create the external files while you create and edit the slide show. b. you can easily change the theme and design of the presentation. c. you can have older data in the source file while having up-to-date data in the presentation. d. collaborators can easily share the presentation.
Answers: 2
You know the right answer?
- The ParkedCar Class: This class should simulate a parked car. The class's responsibilities are as...
Questions
question
Mathematics, 17.09.2020 15:01
question
English, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
History, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Social Studies, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
Mathematics, 17.09.2020 15:01
question
History, 17.09.2020 15:01
Questions on the website: 13722360