'Bicycle class' presentation slideshows

Bicycle class - PowerPoint PPT Presentation



PRG 421 Week 1 Individual Assignment Coding a Program Containing Abstract and Derived Classes//tutorfortune.com

PRG 421 Week 1 Individual Assignment Coding a Program Containing Abstract and Derived Classes//tutorfortune.com

PRG 421 Week 1 Individual Assignment Coding a Program Containing Abstract and Derived Classes//tutorfortune.com Click on below link to buy https://tutorfortune.com/products/prg-421-week-1-individual-assignment-coding-a-program-containing-abstract-and-derived-classes Resources: u2022t"Lesson: Object-Oriented Programming Concepts" on The Javau2122 Tutorials website u2022tDownloadable starter code from the Oracleu00ae website: Bicyle class and BicycleDemo class For this assignment, you will modify existing code to create a single Javau2122 program named BicycleDemo.java that incorporates the following: u2022tAn abstract Bicycle class that contains private data relevant to all types of bicycles (cadence, speed, and gear) in addition to one new static variable: bicycleCount. 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. u2022tTwo concrete classes named MountainBike and RoadBike, 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 Javau2122 Tutorials website. Download the linked Bicycle class, or cut-and-paste it at the top of a new Javau2122 project named BicycleDemo. Download the linked BicycleDemo 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: u2022tChange the Bicycle class to be an abstract class. u2022tAdd a private variable of type integer named bicycleCount, and initialize this variable to 0. u2022tChange the Bicycle constructor to add 1 to the bicycleCount each time a new object of type Bicycle is created. u2022tAdd a public getter method to return the current value of bicycleCount. u2022tDerive two classes from Bicycle: MountainBike and RoadBike. To the MountainBike class, add the private variables tireTread (String) and mountainRating (int). To the RoadBike class, add the private variable maximumMPH (int). Using the NetBeans editor, adapt the BicycleDemo class as follows: u2022tCreate two instances each of MountainBike and RoadBike. u2022tDisplay the value of bicycleCount 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. Submit your TXT file to the Assignment Files tab. Click on below link to buy https://tutorfortune.com/products/prg-421-week-1-individual-assignment-coding-a-program-containing-abstract-and-derived-classes

37 views • 2 slides


View Bicycle class PowerPoint (PPT) presentations online in SlideServe. SlideServe has a very huge collection of Bicycle class PowerPoint presentations. You can view or download Bicycle class presentations for your school assignment or business presentation. Browse for the presentations on every topic that you want.