Part class Create a class called 'Part' that contains information on different parts. Members: partNo - String - The inv

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Part class Create a class called 'Part' that contains information on different parts. Members: partNo - String - The inv

Post by answerhappygod »

Part Class Create A Class Called Part That Contains Information On Different Parts Members Partno String The Inv 1
Part Class Create A Class Called Part That Contains Information On Different Parts Members Partno String The Inv 1 (25.09 KiB) Viewed 28 times
Part class Create a class called 'Part' that contains information on different parts. Members: partNo - String - The inventory part number (a String of 10 Alphanumeric characters) partName.- String -Name of the part • partDese-String - Text description of the part • countOn Hand-int-number of parts available Write getters for each field. Setters are not needed except for countOnHand which is altered by several methods described below. Write at least 1 constructor that takes a reasonable set of arguments to create a new Part.
addInventory() public void addInventory(int amount); This method adds the amount to countOn Hand. decrementInventory() public void decrementInventory(); This reduces countOn Hand by 1. dumpPart() public void dumpPart(); Finally, add a method, dumpPart() which will print out information on the part. It should minimally list the partNo, partName and countOnHand. This will be used for debugging as you write more of the code for the system. Testing Write a UsePart class with a main method that calls your Part methods with various data and arguments. Make sure the methods work as expected before moving on.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply