Question: Submit document with methods for your automobile class, and pseudo code indicating functionality of each method. Example: public String RemoveVehicle(String autoMake, String autoModel, String autoColor, int autoYear) If              values entered match values stored in private variables              remove vehicle information else              return message indicating mismatch   Assignment details/background Create an automobile class that will be used by a dealership as a vehicle inventory program. The following attributes should be present in your automobile class: private string make private string model private string color private int year private int mileage Your program should have appropriate methods such as: default constructor parameterized constructor add a new vehicle  method list vehicle information (return string array) remove a vehicle method update vehicle attributes method. All methods should include try..catch constructs. Except as noted all methods should return a success or failure message (failure message defined in "catch"). Create an additional class to call your automobile class (e.g., Main or AutomobileInventory). Include a try..catch construct and print it to the console. Call automobile class with parameterized constructor (e.g., "make, model, color, year, mileage"). Then call the method to list the values. Loop through the array and print to the screen. Call the remove vehicle method to clear the variables. Print the return value. Add a new vehicle. Print the return value. Call the list method and print the new vehicle information to the screen. Update the vehicle. Print the return value. Call the listing method and print the information to the screen. Display a message asking if the user wants to print the information to a file (Y or N). Use a scanner to capture the response. If "Y", print the file to a predefined location (e.g., C:\Temp\Autos.txt). Note: you may want to create a method to print the information in the main class. If "N", indicate that a file will not be printed.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 5PE: Using classes, design an online address book to keep track of the names, addresses, phone numbers,...
icon
Related questions
Question
100%

Question:

Submit document with methods for your automobile class, and pseudo code indicating functionality of each method.

Example:

public String RemoveVehicle(String

autoMake, String autoModel, String autoColor, int autoYear)

If

             values entered match values stored in private variables

             remove vehicle information

else

             return message indicating mismatch

 

Assignment details/background

Create an automobile class that will be used by a dealership as a vehicle inventory program. The following attributes should be present in your automobile class:

private string make
private string model
private string color
private int year
private int mileage


Your program should have appropriate methods such as:

default constructor
parameterized constructor
add a new vehicle  method
list vehicle information (return string array)
remove a vehicle method
update vehicle attributes method.


All methods should include try..catch constructs. Except as noted all methods should return a success or failure message (failure message defined in "catch").

Create an additional class to call your automobile class (e.g., Main or AutomobileInventory). Include a try..catch construct and print it to the console.
Call automobile class with parameterized constructor (e.g., "make, model, color, year, mileage").
Then call the method to list the values. Loop through the array and print to the screen.
Call the remove vehicle method to clear the variables.
Print the return value.
Add a new vehicle.
Print the return value.
Call the list method and print the new vehicle information to the screen.
Update the vehicle.
Print the return value.
Call the listing method and print the information to the screen.
Display a message asking if the user wants to print the information to a file (Y or N).
Use a scanner to capture the response. If "Y", print the file to a predefined location (e.g., C:\Temp\Autos.txt). Note: you may want to create a method to print the information in the main class.
If "N", indicate that a file will not be printed.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
void method
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT