How many automobiles are to be described

Assignment Help Basic Computer Science
Reference no: EM13219647

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: EM13219647

Questions Cloud

How much would unit sales have to increase : How much would unit sales have to increase before her gross profit would be no less than prior to the price decrease?
Steps in the scientific method : steps in the scientific method and show how a psychologist would use each of them to improve the office's productivity
Should the event be interpreted as evidence : During the oil crisis in the 1970s, long lines at gas stations disappeared soon after price controls were removed and gas prices were permitted to rise. Should this even be interpreted as evidence that the oil companies have monopoly power
Explain carbon dioxide is dissolved in blood : Carbon dioxide is dissolved in blood to form a mixture of carbonic acid and bicarbonate. Neglecting free CO2 what fraction will be present as carbonic acid?
How many automobiles are to be described : 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.
Compute the price charged for each moldboard plow : The firm employs 300,000 direct labor hours and incurs $400,000 of fixed overhead. Given a markup of 30 percent, compute the price charged for each moldboard plow using the absorption cost method.
Astronomy-helium is very common in the sun : Helium is very common in the Sun and calcium is rare. Why are helium lines weak and calcium lines strong in the visible spectrum of the Sun? How would a star regain its state of equilibrium if the energy generation rate of a star were to become sligh..
How many automobiles are to be described : 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.
Solve time value of money problems : What is the value at the end of year 5 of $20,000 deposited today which yield 10% compounded semi-annually and You invested $3,000 for 5 years, compounded annually and at the end of 5 years received $4,407. What was your annual interest rate?

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Write a scheme funtion that takes a list

Write a Scheme funtion that takes a list and an atom as parameters and returns a list identical to its parameter list except with all top level instances of the given atom deleted

  Estimate benefit of a revenue-generating system

Is management able to estimate the benefit of a revenue-generating system or must the system be built on faith? Why?

  What does the memory model of a microcontroller show

What does the memory model of a microcontroller show? Discuss the reasons for different types of memory such as RAM, EEPROM, and FLASH used in HCS12.

  Implementation for the r-type instructions add, or, and and

figuring out how to add an implementation for the R-type instructions ADD, OR, and AND. This is a MIPS architecture. // Incomplete behavioral model of MIPS pipeline

  Write a program that generates 5 random numbers

write a program that generates 5 RANDOM numbers between 60 and 100 and calculates the smallest of the five numbers import java.util.Random; public class RandomNumbers

  Explain the term omniscience

Explain the term omniscience Explain the importance of autonomy in an agent Develop the task environment for an interactive language tutor

  Four techniques for analyzing

Briefly compare and contrast the four techniques for analyzing the costs and benefits of a proposed system. What do you see as particular strengths and weakness of each method?

  Explaining organization management responsibilities

Describe in scholarly detail common organization management responsibilities.

  Deliverable associated required to complete process

Explain in scholarly detail department expense predicting processes and deliverable associated required to complete process.

  Design a finite state machine similar to a 3 bit counter

design a finite state machine similar to a 3 bit counter. in this case you will have 3 bits of state which you can think of as a 3 bit unsigned number, but this time the counter must count by 3s--the sequence it goes through should be 0, 3, 6, 1, ..

  A fuel economy study was carried out

A Fuel economy study was carried out for five models of cars. each car was driven 100 miles, and then the model of the car and the number of gallons used were placed in a line of the file Mileage.txt. Table 7.22 shows the data for the entries of t..

  Hierarchy chart and then plan the logic

Draw the hierarchy chart and then plan the logic for a program needed by the sales manager of The Henry Used Car Dealership. The program will determine the profit on any car sold

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