Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Scarlet Overkill had a device built that is capable of radiating EM field and renders all electronics useless. In an attack by Scarlett and the
Scarlet Overkill had a device built that is capable of radiating EM field and renders all
electronics useless. In an attack by Scarlett and the army of Minions launched against the
Western hemisphere, the device was mounted on a surface vessel The Gru moving through
the Gulf of Mexico.
The formentioned ship has to be destroyed, however, none of our military assets are working
due to EM field interference. Therefore, only nonelectronic assets would work.
Run Silent, Run Deep
Students from EEL took possession of a WWII submarine named the SwordFish, which is
diesel electric with no electronics on board and a small electrical computer, then set out to sink
The Gru. The compass on the sub is worn out and only the East, North, West and South markers
are distinguishable, and hence can only navigate in those four directions.
Write a program as follows:
Ask the user for the amount of diesel loaded in the submarine.
Asks the user for the magnitude distance in meters, and the heading, in degrees of the
navigation to waypoint one.
Decompose the vector into x and y components and output the magnitude and
direction North West, South, or East are the only reliable headings on the subs
compass of the x component and then the y component. The x component is the
magnitude multiplied by the cosine of the angle. The y component is the magnitude
multiplied by the sine of the angle. Determine compass direction depending on weather
the vector component is positive or negative.
Calculate the amount of diesel spent to waypoint and output it Also output the
amount of diesel remaining. The submarine has a fuel capacity of metric tons of
diesel but was loaded with ton in the example. The submarine spends ton of diesel
per miles traveled.
This step has to be repeated for another waypoint.
Ask the user for the target bearing to degrees and range range in meters
Output a firing solution as follows:
Range Torpedo heading will be the target bearing
increased by the percentage below.
to
to
to
to
Target bearing Torpedoes spread
up to degrees
up to degrees
up to degrees
up to degrees
No input validation is required, assume user will enter values of correct type and range.
Ignore small round off differences from test run below.
Note: Create variables to store data as needed.
Sample inputoutput:
Please enter the amount of diesel loaded:
Please enter heading for waypoint in degrees:
Please enter distance to waypoint in meters:
Move on heading due East for meters
Move on heading due North for meters
Fuel spent Tons used.
Fuel remaining Tons remaining.
Please enter heading for waypoint in degrees:
Please enter distance to waypoint in meters:
Move on heading due West for meters
Move on heading due South for meters
Fuel spent Tons used.
Fuel remaining Tons remaining.
Please enter target bearing in degrees:
Please enter target range in meters:
Fire torpedoes on heading degrees with a spread of
degreesScarlet Overkill had a device built that is capable of radiating EM field and renders all
electronics useless. In an attack by Scarlett and the army of Minions launched against the
Western hemisphere, the device was mounted on a surface vessel The Gru moving through
the Gulf of Mexico.
The formentioned ship has to be destroyed, however, none of our military assets are working
due to EM field interference. Therefore, only nonelectronic assets would work.
Run Silent, Run Deep
Students from EEL took possession of a WWII submarine named the SwordFish, which is
diesel electric with no electronics on board and a small electrical computer, then set out to sink
The Gru. The compass on the sub is worn out and only the East, North, West and South markers
are distinguishable, and hence can only navigate in those four directions.
Write a program as follows:
Ask the user for the amount of diesel loaded in the submarine.
Asks the user for the magnitude distance in meters, and the heading, in degrees of the
navigation to waypoint one.
Decompose the vector into x and y components and output the magnitude and
direction North West, South, or East are the only reliable headings on the subs
compass of the x component and then the y component. The x component is the
magnitude multiplied by the cosine of the angle. The y component is the magnitude
multiplied by the sine of the angle. Determine compass direction depending on weather
the vector component is positive or negative.
Calculate the amount of diesel spent to waypoint and output it Also output the
amount of diesel remaining. The submarine has a fuel capacity of metric tons of
diesel but was loaded with ton in the example. The submarine spends ton of diesel
per miles traveled.
This step has to be repeated for another waypoint.
Ask the user for the target bearing to degrees and range range in meters
Output a firing solution as follows:
Range Torpedo heading will be the target bearing
increased by the percentage below.
to
to
to
to
Target bearing Torpedoes spread
up to degrees
up to degrees
up to degrees
up to degrees
No input validation is required, assume user will enter values of correct type and range.
Ignore small round off differences from test run below.
Note: Create variables to store data as needed.
Sample inputoutput:
Please enter the amount of diesel loaded:
Please enter heading for waypoint in degrees:
Please enter distance to waypoint in meters:
Move on heading due East for meters
Move on heading due North for meters
Fuel spent Tons used.
Fuel remaining Tons remaining.
Please enter heading for waypoint in degrees:
Please enter distance to waypoint in meters:
Move on heading due West for meters
Move on heading due South for meters
Fuel spent Tons used.
Fuel remaining Tons remaining.
Please enter target bearing in degrees:
Please enter target range in meters:
Fire torpedoes on heading degrees with a spread of
degrees
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