Question: Use pseudocode lanuage and please label the class diagram, class definition and main application to make it easier to know which is which 4. American

Use pseudocode lanuage and please label the class diagram, class definition and main application to make it easier to know which is which Use pseudocode lanuage and please label the class diagram, class definition and

4. American CarWash provides car washes for Cars. Write an object oriented program with the Car UML class diagram you created in Project 4 A. Create a UML class diagram Create the class diagram for a Car class that contains a car name, car age, and the number of car washes purchased by the Car in the last year. Be sure to choose the most appropriate data type for the attributes. Design a single class diagram showing the class, the application program, the relationship between the two, and multiplicity B. Create a class definition Create a Car class that contains a Car name, car age, and the number of car washes in which the Car has purchased in the last year. Include the following: A default constructor that initializes each attribute to some reasonable default value for a non-existent Car. o Another constructor method that has a parameter for each data member, called the overloaded constructor. This constructor initializes each attribute to the value provided when an object of this type is instantiated. If the Car's number of car washes is not between 0 and 100, then display an error message and set the number to 0. For example, "Flag this Car, number of car washes error" or something you like. Accessor and mutator methods for each attribute. For the car type, if the Car's car name is not "car" or "truck" or "SUV", then set the car type spaces, since this is obviously an error A method that displays all the data about a Car C. Create the main application Write an application program that contains two modules: the main() module and the checkForCar washes() module. The main() module must do the following: o Create and initialize a Car object using the default constructor, naming it carl. Call the appropriate methods to initialize all the data members for the carl object, choosing appropriate values. Create and initialize 2 other different Car objects using the overloaded constructor. Choose appropriate values for the attributes for each of the two Car objects. Call the checkForCarWash(Car carObject) method for each Car object, so there will be 3 calls to the checkForCarWash(carObject) method. The checkForCar Wash(Car carObject) module must do the following: o Accept a Car argument (i.e., it has a parameter declared using Car as the data type). Display all the data for any Car that has more than 50 car washes

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!