Write a program that simulates inventory bins in a warehouse. Each bin holds a number of the same type of parts. The program should use a Class that keeps the following data: Description of the part kept in the bin Number of parts in the bin   Then Create a Stock class which hold an array of 10 bins, which can store data as follows (This is an example to give you an idea): Part Description Number of Parts in the Bin  Valve 10  Bearing 5  Bushing 15  Coupling 21  Flange 7  Gear 5  Gear Housing 5  Vacuum Gripper 25  Cable 18  Rod 12   Provide Constructors, getters, setters and following methods: 1. AddBin (Bin b), this add bins to the array. 2. RemoveBin (String name), removes a Bin form array. 3. AddParts: a function that increases a specific bin’s part count by a specified number. 4. RemoveParts: a function that decreases a specific bin’s part count by a specified number.   When the program runs, it should repeat a loop that performs the following steps: • The user should see a list of what each bin holds and how many parts are in each bin. • The user can choose to either quit the program or select a bin. • When a bin is selected, the user can either add parts or bins to it or remove parts or bins from it. • The loop then repeats, showing the updated bin data on the screen.    Input Validation: No bin can hold more than 30 parts, so don’t let the user add more than a bin can hold. Also, don’t accept negative values for the number of parts being added or removed.     Programming language : Java

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write a program that simulates inventory bins in a warehouse.

Each bin holds a number of the same type of parts.

The program should use a Class that keeps the following data:

Description of the part kept in the bin

Number of parts in the bin

 

Then Create a Stock class which hold an array of 10 bins, which can store data as follows (This is an example to give you an idea):

Part Description Number of Parts in the Bin

 Valve 10

 Bearing 5

 Bushing 15

 Coupling 21

 Flange 7

 Gear 5

 Gear Housing 5

 Vacuum Gripper 25

 Cable 18

 Rod 12

 

Provide Constructors, getters, setters and following methods:

1. AddBin (Bin b), this add bins to the array.

2. RemoveBin (String name), removes a Bin form array.

3. AddParts: a function that increases a specific bin’s part count by a specified number.

4. RemoveParts: a function that decreases a specific bin’s part count by a specified number.

 

When the program runs, it should repeat a loop that performs the following steps:

• The user should see a list of what each bin holds and how many parts are in each bin.

• The user can choose to either quit the program or select a bin.

• When a bin is selected, the user can either add parts or bins to it or remove parts or bins from it.

• The loop then repeats, showing the updated bin data on the screen.

 

 Input Validation: No bin can hold more than 30 parts, so don’t let the user add more than a bin can hold. Also, don’t accept negative values for the number of parts being added or removed.

 

 

Programming language : Java 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY