The app must have at least four classes using the MVC model. The application class where...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The app must have at least four classes using the MVC model. The application class where main() is located is considered a class. ModelCar class should contain the data about the Car. ModelCar class should have the following fields: 1. year - int that holds the car's year. 2. make-string that holds the car's make 3. speed - int that holds the car's current speed ModelCar class should have the following Constructor: A constructor that accepts the car's year, make, and speed. In the body of the constructor move the parameter values into the fields. ModelCar class should have the following methods: getter and setter methods for each field. get ds - should get the values store in the objects field. set methods - should be capable of moving a passed value into the field. accelerate method - should add 5 to the speed field each time it is called brake method - should subtract 5 from the speed field each time it is called. View class should handle all interaction with the user 1. prompt the user to enter car's make 2. prompt the user to enter car's model 3. prompt the user to enter speed 4. Include a method to display the information about a car to the user. Sample Output: Car Year: Car Model: Current Speed: Speed after accelerating: Speed after accelerating: Speed after accelerating: Speed after braking: Speed after braking: Speed after braking: 2015 Mustang 50 8888888 55 60 65 60 55 50 1. Controller class should control the communication between model and view and the program flow of the app. 1. create a method named missionControl that controls the program flow. 2. create an instance of the ModelCar class and pass the values retrieved from the user. 3. call the accelerate method 3 times. 4. call the brake method 3 times e. Admin Class - should provide introductions, directions and closing of the app. f. Main Class - should contain the main method. Within main() the app should create an instance of the Controller class and call the mission Control() method of the controller class. The app must have at least four classes using the MVC model. The application class where main() is located is considered a class. ModelCar class should contain the data about the Car. ModelCar class should have the following fields: 1. year - int that holds the car's year. 2. make-string that holds the car's make 3. speed - int that holds the car's current speed ModelCar class should have the following Constructor: A constructor that accepts the car's year, make, and speed. In the body of the constructor move the parameter values into the fields. ModelCar class should have the following methods: getter and setter methods for each field. get ds - should get the values store in the objects field. set methods - should be capable of moving a passed value into the field. accelerate method - should add 5 to the speed field each time it is called brake method - should subtract 5 from the speed field each time it is called. View class should handle all interaction with the user 1. prompt the user to enter car's make 2. prompt the user to enter car's model 3. prompt the user to enter speed 4. Include a method to display the information about a car to the user. Sample Output: Car Year: Car Model: Current Speed: Speed after accelerating: Speed after accelerating: Speed after accelerating: Speed after braking: Speed after braking: Speed after braking: 2015 Mustang 50 8888888 55 60 65 60 55 50 1. Controller class should control the communication between model and view and the program flow of the app. 1. create a method named missionControl that controls the program flow. 2. create an instance of the ModelCar class and pass the values retrieved from the user. 3. call the accelerate method 3 times. 4. call the brake method 3 times The app must have at least four classes using the MVC model. The application class where main() is located is considered a class. ModelCar class should contain the data about the Car. ModelCar class should have the following fields: 1. year - int that holds the car's year. 2. make-string that holds the car's make 3. speed - int that holds the car's current speed ModelCar class should have the following Constructor: A constructor that accepts the car's year, make, and speed. In the body of the constructor move the parameter values into the fields. ModelCar class should have the following methods: getter and setter methods for each field. get ds - should get the values store in the objects field. set methods - should be capable of moving a passed value into the field. accelerate method - should add 5 to the speed field each time it is called brake method - should subtract 5 from the speed field each time it is called. View class should handle all interaction with the user 1. prompt the user to enter car's make 2. prompt the user to enter car's model 3. prompt the user to enter speed 4. Include a method to display the information about a car to the user. Sample Output: Car Year: Car Model: Current Speed: Speed after accelerating: Speed after accelerating: Speed after accelerating: Speed after braking: Speed after braking: Speed after braking: 2015 Mustang 50 8888888 55 60 65 60 55 50 1. Controller class should control the communication between model and view and the program flow of the app. 1. create a method named missionControl that controls the program flow. 2. create an instance of the ModelCar class and pass the values retrieved from the user. 3. call the accelerate method 3 times. 4. call the brake method 3 times e. Admin Class - should provide introductions, directions and closing of the app. f. Main Class - should contain the main method. Within main() the app should create an instance of the Controller class and call the mission Control() method of the controller class. e. Admin Class - should provide introductions, directions and closing of the app. f. Main Class - should contain the main method. Within main() the app should create an instance of the Controller class and call the mission Control() method of the controller class.
Expert Answer:
Answer rating: 100% (QA)
It looks like youre working on a Java application using the MVC ModelViewController model Heres a ba... View the full answer
Related Book For
Operations Management Creating Value Along the Supply Chain
ISBN: 978-0470525906
7th Edition
Authors: Roberta S. Russell, Bernard W. Taylor
Posted Date:
Students also viewed these programming questions
-
Design a Java class that represents a cache with a fixed size. It should support operations like add, retrieve, and remove, and it should evict the least recently used item when it reaches capacity.
-
Predictive text entry systems are familiar on touch screens and mobile phones. This question asks you to consider how the same principles might be used in a programming editor for creating Java code....
-
Fill in each blank so that the resulting statement is true. I find (f g)(x) by replacing each occurrence of x in the equation for_______ with________ .
-
Using the elements of cost, quality and social issues to frame your description, differentiate your beliefs and opinions about health care policy. Give examples of relevant ethical principles,...
-
Thompson plc manufactures a single product. The budgeted costs per unit for the month of April 2014 were: Anticipated production for April 2014 was 10,000 units. The actual results for April 2014...
-
Write the various types of coals available for combustion and mention their properties.
-
Oxygen at 150 K and 41.64 atm has a tabulated specific volume of 4.684cm3/g and a specific internal energy of 1706J/mol. Compute the specific enthalpy of O2 in this state.
-
Solve the integral equation: I 2f y(x) = e +2 cos(x - t)y(t)dt. 0
-
The following salaried employees of Mountain Stone Brewery in Fort Collins, Colorado, are paid semimonthly. Some employees have union dues or garnishments deducted from their pay. Required: Calculate...
-
Belly Ltd sold goods to Andrews LTD for $ 1000. Andrews ltd paid the account 28 days later. Ignoring GST, the correct entry in Balley ltd's books to record the payment by Andrews Ltd is. a. DR...
-
Your task is to deliver a fiveminute presentation, without visuals, to your class, with the aim of persuading them to donate 1 (or its equivalent value in your currency) to the charity of your...
-
Explore the benefits of silent listening by using a talking stick. Richard Hyde (1993) developed this exercise from the Native American tradition of council. Gather a group of people in a circle, and...
-
Choose an important situation in which you experience debilitative emotions that interfere with your ability to communicate effectively. With the help of a partner or class group, use the steps in...
-
Explore the various types of listening responses by completing the following steps: a. Join with two partners to form a trio. Designate members as A, B, and C. b. A begins by sharing a current, real...
-
The information about the impact of language in Section 6.2.1 shows how the words a communicator chooses can shape others perceptions. Create and present to your class two scenarios for each type of...
-
A vector field is specified as G = xy- yz, + yz2,. determine: Magnitude G at point T(2,-1,3). The distance vector from T to S if S is 5.6 units away from T and in the same i. ii. direction as G at T....
-
Solve the relation Exz:Solve therelation ne %3D
-
Backstreets Pizza delivery service has randomly selected eight weekdays during the past month and recorded orders for pizza at four different time periods per day, as follows: Develop a seasonally...
-
Use either policy deployment or a balanced scorecard to map out a personal strategy for your future.
-
Rosemary Hanes needs help in scheduling the volunteers working at the local crisis pregnancy center. Create a work schedule that will meet the demand requirements, given that a volunteer will only...
-
If you invest $5,000 three years from now, how much will be in the account 15 years from now if i = 10 percent compounded annually? a. $8,053 b. $15,692 c. $20,886 d. $27,800
-
Under what circumstances are the effective annual interest rate and the period interest rate equal? a. Never true b. If the number of compounding periods per year is 1 c. If the number of compounding...
-
If you want to triple your money at an interest rate of 6 percent per year compounded annually, how many years would you have to leave the money in the account? a. 12 years b. 19 years c. 32 years d....
Study smarter with the SolutionInn App