Automobile class for a dealership

Assignment Help Business Management
Reference no: EM131406434

Programming Assignment

Create an Automobile class for a dealership. Include fields for an ID number, make, model, color, year, vin number, miles per gallon, and speed. Include get and set methods for each field. Do not allow the ID to be negative or more than 9999; if it is, set the ID to 0. Do not allow the year to be earlier than 2000 or later than 2017; if it is, set the year to 0. Do not allow the miles per gallon to be less than 10 or more than 60; if it is, set the miles per gallon to 0. Car speed should be initialized as 0. Include a constructor that accepts arguments for each field value and uses the set methods to assign the values. Also write two methods, Accelerate () and Brake (). Whenever Accelerate () is called, increase the speed by 5, and whenever Brake () is called, decrease the speed by 5. To allow users to specify the speed to increase (or decrease), create two overloading methods for Accelerate () and Brake () that accept a single parameter specifying the increasing (or decreasing) speed. Write an application that declares several Automobile objects and demonstrates that all the methods work correctly. Save the files as Automobile.java and TestAutomobiles.java.

Please submit the source code for your program along with a word document that includes screen shots of the compiled results and executed output. The page margins on the top, bottom, left side, and right side should be 1 inch each

Reference no: EM131406434

Questions Cloud

Write a java program : Using these key parts, write a Java program that will allow a user of the program to assign only one runner to each of the 8 lanes of running track in a field.
Discount on diesel fuel : Excel) A tollway truck plaza gives a discount on diesel fuel to truckers based on the total quantity they purchase. Which of the formulas below calculates the correct total price to charge a customer for the diesel pumped based on the following co..
What change in design do you recommend based on your finding : What was learned from the accident (how can an event such as this be prevented in the future?) What specific changes in design, control, operation, training and/or regulation do you recommend based on your findings?
Why is ritualism central in all forms of religious worship : Webster dictionary gave a number of definitions of ‘Ritual': "a system of rites, a Ceremonial act or action, a customarily repeated often formal act or series of acts". In our everyday dealings there are different forms of actions taken that are r..
Automobile class for a dealership : Create an Automobile class for a dealership. Include fields for an ID number, make, model, color, year, vin number, miles per gallon, and speed. Include get and set methods for each field
Primary target of systems design : What is the primary target of systems design and what phases are included in the systems design?
Pressing ctrl-c in the python shell : You can interrupt the above loop by pressing ctrl-c in the Python shell.  A neater way of handling the escape from this infinite loop is to enclose this code in a try-except block.
How an interrupt handler would address the event : Outline the process that occurs when a hardware interrupt is generated by a disk controller. Set the context for the interrupt (disk read or write) and describe how an interrupt handler would address the event.
Return on security investment : Return on Security Investment (ROSI) Actions for 'Return on Security Investment (ROSI)' Must post first.SubscribeHide Description This discussion item is part of the Analysis of Alternatives exercise.

Reviews

Write a Review

Business Management Questions & Answers

  Examine the three types of inpatient reimbursement systems

Examine the three types of inpatient or outpatient reimbursement systems? Evaluate the key advantages and disadvantages of each system from the point of view of a managed care plan and the hospital?

  Explain how does the ucc define a sale

The statute is limited to goods sold in California also Monaco argued that this RV had been sold in Nevada. Explain how does the UCC define a sale

  Dividend valuation models

Comment on this statement: "Dividend valuation models (such as the Constant Growth DDM shown below) essentially determine the intrinsic value (present value) of future dividends. = -

  Product or service for the new company division

Write a 1,400- to 1,750-word paper in which you explain the importance of innovation in your selected business's vision, mission, and values, and determine your business model for this new division. Include the following:

  Set of rules for controlling the meeting

A. Demonstrate courtesy and consideration of each other, and control who is allowed to speak B. Schedule meetings in advance C. Have a purpose for the meeting with the right people in attendance D. Create and publish an agenda and a set of rules for ..

  Income and balance sheet statements

Writting Project: Review P&G's income and balance sheet statements for the last 5 years (you will get this data from their website) and comment on trends in revenue, gross margins, R&D, SG&A, cash position and debt

  Cultures can have powerful effects on employee behavior

Cultures can have powerful effects on employee behavior

  Dust cutter beverage company

This provides everything a busy executive needs to know to invest (or not) in your proposal. It captures your key proposal and recommendations/decision factors, and projected outcomes of the plan's recommendations. Note this is not an introduction..

  Delegate the duties of the contract or to discharge contract

Masterpiece argued that it had a right to delegate the duties of the contract or to discharge the contract due to commercial impracticability. Who wins.

  Illustrate what should your advice to him

After years of being an entrepreneur, John Doe has come to you for help in establishing his first Web site. He has expressed a desire to have a site with all the "bells and whistles" he can get. Illustrate what should your advice to him be

  Plans are being made to produce a product

For case IV, both resources supply separate but dependent markets" that is the number of units of output for both x and y is equal. Plans are being made to produce a product that requires 40 minutes on resource x and 30 minutes on resource y

  Main determinants of aggregate supply

It has been asserted that the main determinants of aggregate supply can be grouped into four: resource quantity (e.g., labor, capital, land, and entrepreneurship), resource quality or productivity, and resource price.

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