How many automobiles are to be described

Assignment Help Basic Computer Science
Reference no:

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:

Questions Cloud

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?
The dsm-iv is an important tool for clinicians : The DSM-IV is an important tool for clinicians. It provides a standard for diagnoses to be standardized across psychology; however, the DSM-IV is not as precise for diagnosing personality disorders as some psychologists would like.
Estimate the volume of naoh from phosphoric acid : estimate the volume of 5 M NaOH must be added to adjust the pH from 4 to 9 solution of 100mL 100mM phosphoric acid
Write out that induction proof explicitly : Write out that induction proof explicitly, and also show explicitly how the invariant implies that the greedy satis?ability algorithm is correct.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Line of developmental training and inspirational materials

The Becoming Company is a full service provider for a line of developmental training and inspirational materials including videos, music, and books called Drive Change.

  What are the pro and con of digital rights managment

What are the pro's and con's of Digital Rights Managment?

  Compare time complexity of convolution with kernel

Compare the time complexity of convolution with a n x n kernel when using: direct convolution with the 2-D mask, and separable kernel.

  Derive taylor polynomials of degree

Derive taylor's polynomials of degree n for: f(x) = (1+x)^(1/2) and f(x) = cos x. Find the approximate value of above functions at x = pi/4 by hand calculator upto two decimal points. Show steps.

  Express statements using quantifiers and logical connectives

Express each of these statements using quantifiers, logical connectives, and the predicates P(x), Q(x), R(x) and S(x). Does the fourth item follow from the first three taken together?

  Storage system that best fits the needs

An information technology recruiting firm has been growing rapidly over the past few years. The number of clients over the past year has quadrupled, and the number of employees has doubled.

  Using sequential logic, counters and shift registers propose

using sequential logic, counters and shift registers propose a more complex system utilizing some of the more complex sub systems. example a motion acitavated light. Needs to be somthing other then a light example like motors or somthing

  Determine number of toes of chicken using calculations

If radix r utilized by chicken corresponds to its total number of toes, determine how many toes does chicken have on each foot?

  Explain how risc-pipelining evolved over past years

Explain how concepts such as RISC, pipelining, cache memory, and virtual memory have evolved over the past twenty-five years to improve system performance.

  Which of the following is true

Which of the following is true? a. A program can call, at most, one method. b. A program can contain a method that calls another method. c. A method can contain one or more other methods. d. All of these are true

  Design the storyboard

Design the storyboard,interactivity diagram, object diagram, and any necessary scripts for an interactive program for customers of Sanderson's Ice Cream Sundaes.

  Create a quick wedding program in indesign

create a quick wedding program in Indesign. Are there any websites with templates for wedding programs for Indesign? I am using Indesign CC.

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