Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

It s your first day of work at Minnesota Ore Mining, Incorporated ( MOM , Inc. ) and you have been assigned to a project

Its your first day of work at Minnesota Ore Mining, Incorporated (MOM, Inc.) and you have been assigned to a project to develop a semi-automatic ore-loading vehicle. Your
part of the project is to design a high level program that will test the capabilities of the
vehicle by simulating its operation in a single level underground cavern. It involves
evaluating the ability of the vehicle to travel through a 2x2 cavern and report on the amount
of ore present in a visited chamber and whether or not to load the ore into the vehicle.
The testing of the vehicles operations consists of:
1) reading a valid command from the keyboard
2) determining if the choice of direction is allowable by comparing it to
the known exit from the chamber
3) displaying the chambers allowable exit and an appropriate error
message if the choice of direction is not allowable
4) asking if ore should be loaded into the vehicle
5) keeping a running total of how much ore was loaded from each
chamber and how much is left in each chamber if loaded
The valid commands include:
N,n travel north one chamber --- increment y-index
E,e travel east one chamber --- increment x-index
S,s travel south one chamber --- decrement y-index
W,w travel west one chamber --- decrement x-index
The allowable exit from each chamber is:
East from chamber (0,0) North from chamber (1,0)
West from chamber (1,1) South from chamber (0,1)
The amount of ore in each chamber:
Chamber (0,0)=2.3 tons Chamber (1,0)=4.8 tons
Chamber (1,1)=1.7 tons Chamber (0,1)=3.4 tons
Other conditions:
1) Once the vehicle has gone through an allowable exit, the chamber door behind
it is closed. Hence, there is only one allowable exit from each chamber.
2) Variables must be used to store the initial ore weight in each chamber and the
other to store the allowable exit from each chamber.
3) The program terminates once the vehicle is back at chamber (0,0).
4) The program should ask the user if ore should be loaded onto the vehicle from
that chamber. If the user enters y, the program should inform the user how
much ore is in the chamber and how much of it should be loaded onto the
vehicle.
5) Do not accept a negative number for the ore loaded and do not accept an
amount of ore that is more than what is in that chamber.
6) The final report should display how much total ore was loaded into the
vehicle.
7) The programs if statements should compare the users responses to the value
stored in the arrays.
8) The program should display a final report of the amount of ore left in each
chamber after visited.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

Compare and contrast manufacturing and geographic postponement.

Answered: 1 week ago

Question

How much would healthier food cost?

Answered: 1 week ago