Program that asks user how many automobiles are to describe

Assignment Help Programming Languages
Reference no: EM13948946

Write a program that asks the user how many automobiles are to be described, and for each automobile it inputs the user's selection of make and color. Then it outputs color and make. Although you could do this easily using a simple procedural program, do it by using a main method in class AutomobileDriver to instantiate an object called auto from a class Automobile.

In the Automobile class, do the following:

Create a setMake() method. In this method, prompt the user "Input make of auto: ". Store their input into a make variable.
Create a setColor() method. In this method, prompt the user "Input color of auto: ". Store their input into a color variable.
Create "getter" methods for make and color.
Create a printAll() method. In this method, print the color and make of the automobile on one line in accordance to the sample session given below.

In the AutomobileDriver class, do the following:

Create an instance of Automobile.
Call the setMake() method.
Call the setColor() method.
Call the printAll() method.

Be sure your output is similar to the following:

How many autos do you want?: 2
Enter make: Honda
Enter color: Blue

Enter make: Chevy
Enter color: Red

You have a Blue Honda.
You have a Red Chevy.

Reference no: EM13948946

Questions Cloud

What is the significance of the correlations : What is the strength of the correlations between the variables? What measure of quality is impacted most by relationship conflict? Task Conflict? What is the significance of the correlations?
What per-unit inventory cost reported on grehans sheet : What per-unit inventory cost will be reported on Grehan's balance sheet at the end of the year? What will be the reported income?
Most expensive type of external financing of equity : What is the most expensive type of EXTERNAL financing of equity for a company? Why? How can a company use economies of scale when it comes to external raising of capital through equity? Describe the types of fees that are typically included in flotat..
What is the firm weighted average cost of capital : The Imaginary Products Co. currently has debt with a market value of $250 million outstanding. The debt consists of 9 percent coupon bonds (semiannual coupon payments) which have a maturity of 15 years and are currently priced at $983.90 per bond. If..
Program that asks user how many automobiles are to describe : Write a program that asks the user how many automobiles are to be described, and for each automobile it inputs the user's selection of make and color. Then it outputs color and make.
Barter economy versus an economy : Would you be willing to give up your checkbook and instead use an electronic means of payment if it were made available? Why or why not?
What is current cost of common equity for firm-common stock : Underestimated Inc.’s common shares currently sell for $40 each. The firm’s management believes that its shares should really sell for $47 each. What is the current cost of common equity for the firm? what is the cost of common stock for Whitewall?
How you are feeling about your ability to make this change : Describe challenges you anticipate in your journey toward improving your health. Include an explanation of how you plan to overcome those challenges. Describe how you are feeling about your ability to make this change
Review and reflect on the diverse working environments : What were the most compelling points from the interaction with your fellow students - how does understanding leadership and diversity help you lead others through challenges associated with typical discriminatory behaviors in the workforce?

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd