Order Java Coding Assignment
“Lesson: Object-Oriented Programming Concepts” on The Java™ Tutorials website
Downloadable starter code from the Oracle® website: Bicycle class and Bicycle Demo class
For this assignment, you will modify existing code to create a single Java™ program named BicycleDemo.java that incorporates the following:
An abstract Bicycle class that contains private data relevant to all types of bicycles (cadence, speed, and gear) in addition to one new static variable: bicycle Count. The private data must be made visible via public getter and setter methods; the static variable must be set/manipulated in the Bicycle constructor and made visible via a public getter method.
Two concrete classes named Mountain Bike and Road Bike, both of which derive from the abstract Bicycle class and both of which add their own class-specific data and getter/setter methods.
Read through the “Lesson: Object-Oriented Programming Concepts” on The Java™ Tutorials website.
Download the linked Bicycle class, or cut-and-paste it at the top of a new Java™ project named Bicycle Demo.
Download the linked Bicycle Demo class, or cut-and-paste it beneath the Bicycle class in the BicycleDemo.java file.
Optionally, review this week’s Individual “Week One Analyze Assignment,” to refresh your understanding of how to code derived classes.
Adapt the Bicycle class by cutting and pasting the class into the NetBeans editor and completing the following:
Change the Bicycle class to be an abstract class.
Add a private variable of type integer named bicycle Count, and initialize this variable to 0.
Change the Bicycle constructor to add 1 to the bicycle Count each time a new object of type Bicycle is created.
Add a public getter method to return the current value of bicycle Count.
Derive two classes from Bicycle: Mountain Bike and Road Bike. To the Mountain Bike class, add the private variables tire Tread (String) and mountain Rating (int). To the Road Bike class, add the private variable maximum MPH (int).
Using the NetBeans editor, adapt the Bicycle Demo class as follows:
Create two instances each of Mountain Bike and Road Bike.
Display the value of bicycle Count on the console.
Comment each line of code you add to explain what you added and why. Be sure to include a header comment that includes the name of the program, your name, PRG/421, and the date.
Rename your JAVA file to have a .txt file extension.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.Read more
Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.Read more
Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.Read more
Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.Read more
By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.Read more