Question: Lab Objectives Working with classes, inheritance, polymorphism, instanceof operator. Preparation: For this lab, you will be importing pre - existing Java source files. You will

Lab Objectives
Working with classes, inheritance, polymorphism, instanceof operator.
Preparation:
For this lab, you will be importing pre-existing Java source files. You will need to download the file: 44241Lab10SourceFiles.zipDownload 44241Lab10SourceFiles.zip
After you download the zip file, extract in an easy location to find.
Then, in NetBeans, create a new project named Lab10, and drag the source files into the source package.
Lab10.png
Make the proper modifications to the main method according to the instructions below.
Program (10 pts total):
Your task for this lab is to finish the program that has already been started for you. In the main method:
Add your name and the date as a comment in a visible location.
Beneath the code that is already there, create an ArrayList that holds Bicycle objects. Add the ten Bicycles that have been created above.
Using an appropriate loop, iterate through the Bicycles in the ArrayList, making certain changes depending on the subclass of the object, as follows:
If the Bicycle is a Mountain Bike, set the height to 99, and print the bikes info using a label and the toString() method (see Sample Output).
If the Bicycle is a Tandem Bike, set the betweenSpace to 88, and print the bikes info using a label and the toString() method.
If the Bicycle is a Road Bike, set the handlebarType to NewType, and print the bikes info using a label and the toString() method.
Notes:
Your output should match the Sample Output exactly.
You will need to use object casting and the instanceof operator when manipulating your objects.
Sample Output:
img2-4.pngimg3-1.png
Submission Instructions: To receive credit for this lab, you must turn the lab in using the method below.
Record a VidGrid screen video that shows the following:
Open the command prompt window that shows what user is logged in to the computer. See example below:
img11.png
Then, in NetBeans, scroll to show all your code, including all comments. Make sure that your project directory is visible as well. See example below:
img12.png
Show the program running from beginning to end and make sure the output window is visible.
Embed your screen video into the correct assignment/discussion for this lab.
DO NOT ATTACH the file or you will lose points, the video should be embedded in your discussion. Late submissions will not be graded.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!