Question
Write a program in Java to simulate operation of a simple robot in a delivery center. The robot will move in two directions, forward and
Write a program in Java to simulate operation of a simple robot in a delivery center. The robot will move in two directions, forward and backward. The purpose of the robot is to move items and place it in the right slots in each station. The robot's arm goes up and down to place items in the designated area. There are eight stations plus the pick up station. The pick up station is the initial start where the robot picks up the items. Eight items can be placed on each station, programmer determines how many slots are on these eight stations. The nearest station must be filled before placing items on next stations. The items are marked with identification and serial numbers. The items with an even serial number go to the left side and the items with odd number fo to the right. The last slot, number seven, is reserved for light items less than 60 kg. The serial number is a three digit number, the MSB(Most Significant Byte) digit 5 indicates that product is placed in fifth station, which is keeping the product at 21 degrees Fahrenheit. By receiving a message of unload, the robot should start to empty the fifth station and place items in a container until it is empty. There are two other separate stations marked as 10 and 11 which consist of 4 slots. The station 10 is designated for items that are immediate delivery and station 11 is for items with 5 day storage. Another station is marked as station 9 which is for special delivery. The slots are stacked on one another at the stations, and if it is above 6 slots, robot must raise itself up to place item. There is also a station to hold defective items, with a method to check for damage. The user, during compile, should input all data, such as robot direction, number of items placed,and station to go to. Using this information, Program output should state robot's direction moved(forward,backward), total number of items placed at station, and station number after moving from initial start (pick up station). For example, if robot moves forward once, it is at station 1, and if it moves foward once again, it is at station 2. If it is at station two and it moves backward once, then it is at station 1. There are total 11 stations,
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started