Our teacher wants to see if we can program a javascript talking about the way they kinda made movie lies in the movie the italian job they end up breaking in the bank vault stealing 274 gold bars which weighed 7520 pounds of gold the mini coopers had to each haul off 1800 pounds of gold each which would have been 65 gold bars.

Our given assignment is to let the user choose from a 2 door or a 4 door mini cooper.

The 2 door mini cooper has a cargo load of 24 cubic feet which is 41,472 cubic inches.
The 4 door mini cooper has a cargo load of 32.8 cubic feet which is 56,678.4 cubic inches.

once the user chooses there car they need too choose the type of metal they want to load in there car

The list of metal is ["Silver", "Platinum", "Aluminum", "Copper"]

once the user has chosen their metal we now need to calculate

Assuming the metal bar the chose from the list is up to the Fort Knox standards

There are questions that need to be answered

The number of bars that it will take to fill the mini cooper with 1800 pounds of the bars and, how much space it will take up of the available cargo space for the model of mini cooper they chose. Will they fit in the chosen mini coopers cargo space? You can round up to the next bar so the total weight is just over 1800 pounds instead of just under 1800 pounds. User an if/else statement to choose the appropriate properties for the chosen metal. Report all the numbers that you used as input and came up with in your calculations.

2) in addition calculate how many bars the users chosen metal it would take to fill up 1/3 of the cargo space of the chosen Mini Cooper and will it exceed the weight limit of 1800 pounds?

As your program runs it should print your name, and the program information to the screen, and ask for the type of metal and the mini cooper model.

Perform the calculations and report on the items listed above. Be efficient in your program calculations. You will need an if/else if block to determine the density value for the calculation and another one to determine the cargo space. Do not repeat your calculations over and over again -- instead pass the density and the cargo size into the function that does the calculations and concatenates your message here too. You can call this function from another function that contains all the if statements.

Hint It is OK to use the cargo spaces as in terms of cubic inches and calculate the cubic inch volume of Fort Knox bar (convert cubic feet into cubic inches) You can use these values to determine if the bars will fit in the cargo space instead of trying to guess the exact layout of the mini coopers cargo space.

Be sure to use default values.

Density chart

Metal lb/in^3

Silver 0.379

Platinum 0.774

Aluminum 0.098

Copper 0.323

Example Code

if the user chose silver as their metal and chose a 2 door then the first question would be

Question 1
The 2-door mini cooper can carry 107 silver bars.
It only takes 4751.469 cubic inches of the 41,472.000 available cubic inches of cargo space.
It will fit

Question 2
For loading 1/3 of the 2-door mini coopers cargo space.
it would take 312 silver bars.
total weight of these metal bars is 5239.296 lbs
It exceeds the 1800 pound limit
It will not fit

I just do not know how to think this out logically i know that i need to calculate the space of each metal bar then i need to see how many it will take too fill the cargo space up and the second question is seeing how many will take to fill 1/3 of the cargo and will it exceed the 1800 pound limit.

If someone can explain this out a little clearly i would greatly appreciate it

I'm not asking for someone to do this for me just to help me get started on the right track.

Thanks in advance btw.

Sorry, but chances are you aren't going to get help here for homework questions. I'd say just ask your teacher for help or to better explain the question.

50% of getting a proper solution is understanding the question. If the question isn't clear, ask until it is.

Also, tell your teacher that the cars in the movie were modified (there are scenes showing this), therefore making this program is moot. Caution, this probably won't help you out, but would be really funny.