A. S22 – Bike Inventory
Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Scenario: The Bike Store is writing a new system to manage inventory. You need to write a class that sets up bikes received. The fields to store are brand, model, size, type, and price. There are three different types of employees to enter data about the bikes, the Receiving Clerk, the Tech 1, and the Tech 2. You don’t need to worry about the three types of employees, just the roles they play. The Receiving Clerk can only create the bike object and doesn’t know any of the properties (fields). The Tech 1 has access to all the properties of the object except price. The Tech 2 has access to all the properties including price.Typical shipment:
BrandModelSizeTypePriceTrekT-Domane52Road Bike7,449.99TrekT-FX3DiscLHybrid929.99TrekT-SiskiuMMountain Bike1,599.00TrekT-MarlinLMountain Bike575.63SpecializedS-Allez56Road Bike1,000.00SpecializedS-Roubaix54Road Bike4,200.00SpecializedS-RockhopperMMountain Bike700.00HuffyH-SeaStar18Kids Bike78.00HuffyH-RockIt12Kids Bike58.00
Bike Class: The class should include:
A noargs method (pg 349) to instantiate the class (this would be used by the Receiving Clerk)
A constructor #1 method (pg 346) to instantiate the class with all initial values except price (this would be used by the Tech 1)
A constructor #2 method to instantiate the class with all initial values (this would be used by the Tech 2)
A mutator (setter) method (pg 331) for each field, to set the value for the field (these would be used by the Tech 2 to enter all the data for a bike).
An accessor (getter) method (pg 332) for each field, to get the value for the field
Demo Program (ex: pg 337): Write a demo program that tests the class.
Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper
Use the noargs method to create an object (tests Receiving Clerk capabilities). It will then need to populate the fields individually (tests the Tech 2 capabilities).
Use the first constructor to create an object will all the fields populated except the price (tests the Tech 1 capabilities when they enter data from receiving). It will then need to update the price (Tech 2).
Use the second constructor to create an object will all fields populated (tests the Tech2 capabilities when they enter data from receiving).
Create a report of the three bike objects to test the get methods
Example of 1 of the 3 bikes printed:Brand: TrekModel: T-SiskiuSize: MType: Mountain BikePrice: $1,599.00Optional Example of the report:Brand Model Size Type PriceTrek T-Siskiu M Mountain Bike $1,599.00Specialized S-Roubaix 54 Road Bike $4,200.00Huffy H-RockIt 12 Kids Bike $58.00
Hints/Tips:
You do not need to enter all the data in the typical shipment. It’s there to show you what the system will need to handle. Your need to test your class which will handle uses by the Receiving Clerk, the Tech 1, and the Tech 2. You need to test all the methods you define in your class, which will be accomplished if you following the instructions for the Demo Program.
Be sure to test all three constructors. Two of the constructors do not update all the data, so you’ll need to set the values that aren’t updated individually.
The class program is very easy to write, just make sure you do the right thing in the right places. I copied code and didn’t make all the necessary changes, slowing me down in testing.
You can hardcode the values for the bikes rather than getting the info from the user. It makes testing much easier.
It took me a little over 45 minutes to complete, which included the class and demo programs.
Turn in your highest-quality paper
Get a qualified writer to help you with
“ UNT Programming Bike Inventory Project ”
Get high-quality paper
Guarantee! All work is written by expert writers!