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

  Explain how and what made the situation positive

Explain how and what made the situation positive, and connect it to the readings. If you have not experienced a positive situation, please describe the negative environment and how you would change it.

  How you characterize way in which your group has assimilated

How would you characterize the way in which your group has assimilated or interacted with other cultures? Which theory of assimilation best explains how your group assimilated?

  Explain how the organization is using six sigma and why

Explain how the organization is using Six Sigma, and why. Research and describe a business that currently using Six Sigma

  Show industrial and organizational psychology

Explain the focal point of this discussion is to show the importance of industrial and organizational

  Explain about conflict management and team building

How to develop skills to assimilate into newly formed teams and become effective members quickly and efficiently and Team members

  Utilizing linear programming

What benefit would be gained by utilizing linear programming (LP) for marketing research? Discuss and provide a basic example of how LP can be used for marketing and/or consumer research.

  Develop a wbs for a local stage play

Develop a WBS for a local stage play. Be sure to identify the deliverables and organizational units (people) responsible. How would you code your system? Give an example of the work packages in one of your cost accounts. Develop a corresponding OB..

  How many gallons of ice cream and frozen yogurt

How many gallons of ice cream and frozen yogurt should restaurant order to maximize itsweekly profit?

  Classify what you believe to be the three important effects

Classify what you believe to be the three most important effects of farming and explain your choices thoroughly.

  Immigration consdebate the cons for subsequentimmigration

immigration consdebate the cons for subsequentimmigration policy-policy placing a limitation on number of people

  Management in practice at airasia

How might classical approaches to management have influenced AirAsia's expansion over years? How can a low-cost airline such as AirAsia realistically incorporate philosophies of the behavioural theories of management?

  How might the local governing bodies implement tax policies

Select one area of development needed in your own community (VIRGINIA BEACH) and create a sustainability plan around it, addressing the questions listed below: How might the local governing bodies implement tax policies to encourage such development?..

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