Vehicles class to instantiate three objects making

Assignment Help Business Management
Reference no: EM131310787

Create a class named Vehicle that acts as a superclass for vehicle types. The Vehicle class contains private variables for the number of wheels and the average number of miles per gallon (MPG).  For each of these variables - create the proper get and set methods. The Vehicle class also contains a constructor with integer parameters for the number of wheels and average MPG. Create two subclasses, PassengerCar and Truck that extend the Vehicle class. The PassengerCar class will have an additional field  fuelTankCapacity and the method MaximumDistanceDriven, which calculate the maximum ride distance using the proper  MPG and fuel tank capacity values. The Truck class has the additional cargoLoad field. Each subclass contains a constructor that accepts the MPG value and forces the number of wheels to the appropriate values - 4 for a PassengerCar and 8 for a Truck. The PassengerCar constructor also accepts fuel tank capacity value, and the Truck constructor accepts the cargo load value. All classes contain appropriate get and set methods for each newly added field.

Write a Use Vehicles class to instantiate three objects making use of proper overloaded class constructors: one object of the Vehicle class, one object of the PassengerCar class and one object of the Truck class. When doing so, accept the user input and provide proper values for each the fields of each object (use Scanner of JOptionPane classes to implement a user's input).

Display the content of every data field in the newly created object: the number of wheels and average number of miles per gallon values for the Vehicle object; the number of wheels, miles per gallon, fuel tank capacity and maximum distance driven for a passenger car; number of wheels, average number of miles per gallon and cargo capacity for a Truck object.

Reference no: EM131310787

Questions Cloud

Determine the temperature of the ambient air : A ''cooling bag,'' commonly used for storing water in hot, arid environments is made of a thin porous fabric.- Determine the temperature of the ambient air using mass-transfer considerations.
Identify and describe the stages of team development : Identify and describe the stages of team development.How might stronger team skills benefit you? How might you use teamwork skills in your job? Provide specific examples.What is it like to participate in a virtual meeting, such as web-based, teleconf..
Calculate the pressure indicated by the probe : An impact probe is exposed to an airflow stream at 0?C, 20 kPa, and 600 m/s. What pressure will be indicated by the probe at a zero yaw angle?
Summarize the group communication competencies survey : Summarize the Group Communication Competencies Survey.Write a summary of your results and ways to improve your competency.
Vehicles class to instantiate three objects making : Write a Use Vehicles class to instantiate three objects making use of proper overloaded class constructors: one object of the Vehicle class, one object of the PassengerCar class and one object of the Truck class. When doing so, accept the user inp..
What pressure will be indicated by the probe : Water flows in a 5-in-diameter pipe at 20?C with a mean flow velocity of 3 m/s. A sharp-edged orifice with a diameter of 2.5 in is to be used to measure the flow rate. What pressure differential would be indicated for a standard ASME installation?..
Prompts a user for the course information : Write an application driver UseCourse class with the main() method, which prompts a user for the course information (use Scanner class or JOptionPane).
Computers transmit simultaneously : With a bus topology, what technique is used to handle data corruption when two computers transmit simultaneously?
What would be the indicated pressure : A Pitot tube with a yaw angle of 10? is used for the airflow in Prob. 7.39. What would be the indicated stagnation and dynamic pressures? Express in units of Pa, lbf/in2, and inH2O.

Reviews

Write a Review

Business Management Questions & Answers

  Caselet on michael porter’s value chain management

The assignment in management is a two part assignment dealing 1.Theory of function of management. 2. Operations and Controlling.

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. Due to increase in the preference for light beer drinkers, Chris Prangel wants to introduce light beer version in Mountain Man. An analysis into the la..

  Mountain man brewing company

Mountain Man Brewing, a family owned business where Chris Prangel, the son of the president joins. An analysis into the launch of Mountain Man Light over the present Mountain Man Lager.

  Analysis of the case using the doing ethics technique

Analysis of the case using the Doing Ethics Technique (DET). Analysis of the ethical issue(s) from the perspective of an ICT professional, using the ACS Code of  Conduct and properly relating clauses from the ACS Code of Conduct to the ethical issue.

  Affiliations and partnerships

Affiliations and partnerships are frequently used to reach a larger local audience? Which options stand to avail for the Hotel manager and what problems do these pose.

  Innovation-friendly regulations

What influence (if any) can organizations exercise to encourage ‘innovation-friendly' regulations?

  Effect of regional and corporate cultural issues

Present your findings as a group powerpoint with an audio file. In addition individually write up your own conclusions as to the effects of regional cultural issues on the corporate organisational culture of this multinational company as it conducts ..

  Structure of business plan

This assignment shows a structure of business plan. The task is to write a business plane about a Diet Shop.

  Identify the purposes of different types of organisations

Identify the purposes of different types of organisations.

  Entrepreneur case study for analysis

Entrepreneur Case Study for Analysis. Analyze Robin Wolaner's suitability to be an entrepreneur

  Forecasting and business analysis

This problem requires you to apply your cross-sectional analysis skills to a real cross-sectional data set with the goal of answering a specific research question.

  Educational instructional leadership

Prepare a major handout on the key principles of instructional leadership

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