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

  Member functions for returning the monthly payment

Your loan class should have member functions for setting the loan amount, interest rate, and number of years of the loan. It should also have member functions for returning the monthly payment amount and the total amount paid to the bank at the en..

  Explaining multiple client computers and servers

In network with multiple client computers, servers, switches and wireless access points, write down resources must be scanned for possible vulnerabilities.

  Explain d-s access control list gives p full rights

Suppose that d's access control list gives p full (read, write, append, and execute) rights to d. In which ring(s) should p execute for following to occur?

  Give the contents of eax

in each additional instruction in this problem, assume that EAX contains a given contents before the instruction is executed, and give the contents of EAX as well as the values of the CF, OF, SF, and ZF flags after the instruction is executed:

  Strategic advantages voip brings to businesses

Write down some of the strategic advantages the VoIP brings to businesses that adopt it? Prior, voice and data networks were separate and typically maintained by separate groups.

  How technology contributed to modern theatre

How has technology contributed to modern theatre? If you have seen play or musical recently, analyze how technology contributed to its production.

  Explain bec corporate is department

If you were the system analyst in BEC corporate IS department and you had recieved call from Carrie douglas about her Project idea,what would you suggest to Carrie?

  Identify a recent moral dilemma or ethically questionable

Identify a recent moral dilemma or ethically questionable situation relating to ICT - use the Doing Ethics Technique (DET), ensuring you address each of the DET questions;

  What is the numeric value of the binary representation

What is the numeric value of the binary representation 0.101101101101101101... in decimal and fraction form?

  Create an inheritance hierarchy

Finally add an abstract method named Print which will be implemented in the derived classes.

  Explain how to generate array of random numbers

For some general variables L and U, write a comment that explains how to generate a 1 x N array of random numbers whose values are between L and U.

  Write and explain the definition of composition in c++

Write and explain the definition of composition in C++ and how it is useful in writing object-oriented programming. Also, explain how it is different from inheritance and how both inheritance and composition are useful in developing object-oriente..

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