In: Computer Science
1 Program Summary
We are subcontractors for the Corellian Engineering Corportation (CEC) and we are working on one of the subsystems for the MC85 star cruiser. Our task is to model stress on a particular surface of the cruiser. Stress is defined as σ = Ld Area , where Ld is the load and Area is the area. Let’s say we are working with the metric measure system. So the load would be in kilograms. Area would be meters. We need log into the system and enter the weight (Load) and the Area, (length x width) and calculate and display the stress on that particular area.
2 Program Behavior
The program will do the following.
1: declare floating point variables, fLoad, fWidth, fLength and initialize them
2: declare a string to hold login password
3: display the message ”Stress Modeling SubSystem 0.1a”
4: display the login message ”Login ID: ”
5: get the login id from the user
6: compare it to the special code ”0a132”
7: don’t do the calculation if special code doesn’t match, also print out an error message (see below)
8: if the login id matches the special code we prompt the user for load, length and width
9: make sure that we give the user an error message if either length or width are 0, also print out an error message (see below)
10: we calculate the stress value
11: we display the stress value with accuracy of 2 decimal places.
12: make sure we always show the decimal value
Example display from your program.
What you type in is in bold font below.
Output if login was successful
Login ID: 0a132
Stress Modeling Sub System 0.1a
Enter Load (kg): 1000.2
Enter Length (m): 5.2 Enter Width (m): 3.1 Stress is k/m2̂ = 62.05
Output of login was unsuccessful
Login ID: DVleet
Login Unsuccessful
Output if length and/or width zero
Login id: 0a123
Stress Modeling Sub System 0.1a
Enter Load (kg): 1000.2
Enter Length (m): 0
Enter Width (m) : 0
Error possible divide by zero
Stress not calculated
Please note that I will be compiling your code on my computer and testing your code to see if it runs. use c++ language for this assignment and please do add a screenshot of all your codifications and outputs.