Question

In: Computer Science

1 Program Summary We are subcontractors for the Corellian Engineering Corportation (CEC) and we are working...

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.

Solutions

Expert Solution


Related Solutions

1 Program Summary We are subcontractors for the Corellian Engineering Corportation (CEC) and we are working...
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 kilo grams. Area would be meters....
We are working on functions of complex variables in calculus (Chpt. 17.4 in Advanced Engineering Mathematics),...
We are working on functions of complex variables in calculus (Chpt. 17.4 in Advanced Engineering Mathematics), and our prof posed us the following question: "Find the function w = u + iv = f(z) that maps the region S := {z : 0 ≤ arg z ≤ π 4 } to the upper half plane {w = u + iv : v ≥ 0}." the answer he gave to this problem was as follows: "such a mapping is given by...
One page summary of cardiac tissue engineering.
One page summary of cardiac tissue engineering.
Executive Summary of Impacts of Engineering Decisions on Financial Statements
Executive Summary of Impacts of Engineering Decisions on Financial Statements
Select any engineering company and assume you are an engineering manager working in that company. Your...
Select any engineering company and assume you are an engineering manager working in that company. Your department has been awarded an external grant of $1M to select 1 project of your choice. You have identified 5 mutually exclusive projects to choose from. However, you can only select one and you have decided to select the 1 project by using NPV-based analysis. For this question, you do not have to calculate NPV or show any calculations. (a) List your 5 hypothetical...
Civil engineering Working at high saffolding seafty pdf
Civil engineering Working at high saffolding seafty pdf
Civil Engineering (Geo-Polymer Concrete) Summary: Do some researches & write one or two page of summary...
Civil Engineering (Geo-Polymer Concrete) Summary: Do some researches & write one or two page of summary report on design and uses of geo-polymer concrete. Focus attention on the mix design, and specific uses. Include the Work cited if it’s possible.
Civil Engineering (Geo-Polymer Concrete) Summary: Do some researches & write one or two page of summary...
Civil Engineering (Geo-Polymer Concrete) Summary: Do some researches & write one or two page of summary report on design and uses of geo-polymer concrete. Focus attention on the mix design, and specific uses. Include the Work cited if it’s possible.
1.F): Understanding of ethical and professional responsibilities William, an engineer working for an established engineering firm,...
1.F): Understanding of ethical and professional responsibilities William, an engineer working for an established engineering firm, is working after normal business hours to finish an important and urgent on-going bid. He realizes that he is missing data that had been sent to his coworker Mike. William had inadvertently observed Mike typing his password several days ago and decides to log into Mike’s computer and resend the data to himself. Upon doing so, William sees an email sent from Mike’s account...
1 Purpose This is another program for reading from files. In this program we will read...
1 Purpose This is another program for reading from files. In this program we will read blocks of data from a (well-formatted) file that you will be given and make some computations on that data. The input file will be formatted as described later in this document. It will be similar the “block” data from Lecture 10. 2 Procedure You will create one source code program, Prog07.cpp. This program will 1. Prompt the user for an input filename. Store the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT