Reference no: EM13950563
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.
How much would you need to earn in salary
: Given that historical inflation rates have averaged 4% over the past 50 years, how much would you need to earn in salary 25 years from now to equal the 75K that you currently make?
|
Clearly connect to supportive evidence
: Write a 750- to 1,050-word paper describing how ethical principles can address organizational issues. Include the organization you selected and discuss the following with regards to that organization and its
|
What are the effects of contracts on the income distribution
: Prepare the necessary eliminations for the consolidated worksheet on December 31, 20X1. What are the effects of these contracts on the income distribution schedules?
|
Determine the mass flow rate
: If the throat area is 7.6 3 1024 m2, and the exit plane pressure is 2.4 bar, determine the mass flow rate, in kg/s, and the exit area, in m2.
|
Program that asks how many automobiles are to be described
: 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.
|
What is the most important finding offered in this work
: What is the most important finding offered in this work? What is her method for gathering the data that led to this study, and why does she choose these methods
|
Converging-diverging nozzle
: A converging-diverging nozzle operates at steady state. Air as an ideal gas with k 5 1.4 flows through the nozzle, discharging to the atmosphere at 14.7 lbf/in.2 and 5108R. A normal shock stands at the exit plane with px 5 9.714 lbf/in.2 The exit ..
|
Prepare a partial trial balance using the data from entries
: Prepare a partial trial balance using the data from your entries, and show the eliminations relating to the contract for the December 31, 20X1, consolidated worksheet.
|
Compare and contrast solicited and unsolicited proposals
: Compare and contrast solicited and unsolicited proposals. Which do you think is harder to write? Why?; and Given your academic major and/or your chosen career field, describe a situation where you would write an unsolicited proposal to either an inte..
|