Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As a Software Developer, you are tasked by an international construction company expansion Calculator program. When a bridge or overhead walkway is constructed, the Engineer

As a Software Developer, you are tasked by an international construction company expansion Calculator program. When a bridge or overhead walkway is constructed, the
Engineer must consider that the material used in the construction will expand or
contract in response to temperature variations. Failure to take the material
expansion/contraction into account could potentially lead to severe damage to these
structures, and endanger the safety of the public.
To solve this problem, the engineer needs to determine by how much the length of the
structure will change, and build in a safety factor. The total length of the bridge must be
taken into consideration when determining the expansion length, then allowance
should be made for this movement by including expansion joints (gaps) over the total
length of the bridge.
Since different construction materials expand (and contract) at different rates to a
temperature change, a linear expansion coefficient is introduced which has been
determined for various materials. Steel and concrete have the same coefficient
(CTE_CS), which is
1
.
2
10
5
, and aluminium has a coefficient (CTE_A) of
. The
coefficient values are constant. The constant identifier names are shown above in
parentheses.
2
.
4
10
5
This multi-function program must give the user the opportunity to select the desired
calculation via a menu. This menu will allow the user to select either a single calculation
or generate an expansion table. Once the user has selected their option, the program
will test for a valid user input. If the input is valid, then it will ask the user to enter
certain parameters and the material used before proceeding to the next stage of the
program. Should the users input be invalid, the program will not ask the user to enter
these parameters and will proceed to the next stage. The next stage determines what
further action should be taken based on the users initial selection.
Careful attention should be taken in designing this program according to the specified
structure. It is strongly advised that this program be developed in stages. After each
section is completed, the program must be tested. Do not continue development of the
program if a particular section does not work. If the program cannot compile and
execute successfully, it will incur severe loss of marks.
At all times, adhere to the specifications, as marks are allocated accordingly.
2|
SFD261S -2024- GA-Assessment (GA9)
Program Specification
A Title Block must be created and appear above the source code of your program. The
title block must contain the following: Name, Surname, Student Number, and Date.
Specifications for Functions:
Function main()(this section deals with all the requirements for function main())
1. The only variables allowed in this function are: TempC, T_Length, M_Opt, Sel.
Choose your variable data types carefully.
2. The menu() function should be called to allow the user to select the appropriate
calculation.
3. Once the selection has been returned, a test must be conducted to determine if
the user terminated the program. If not, the user must enter the values of the
total length of the construction and the maximum temperature (\deg C) to be
considered in the design. See screenshot (Figure 1).
4. The user will now be presented with a list of available construction materials
that could be used, from which the user will be requested to select. See
screenshot (Figure 2).
5. A test should then be performed to ensure that if the material is not available
from the list and the user did not select X in the menu() function, then the
variable Sel should be set to the character value of E.
6. A switch() statement will then be used to determine what further action should
be taken based on the users initial input from the menu() function. Should the
user have terminated the program in the menu() function (X), then the message:
User terminated program, should be displayed. The default message should
display: User termination Material not listed. The switch statement does not
test for the E character, so this becomes the default option.
7. No calculations or answers should be printed in this function.
Function menu()(this section deals only with what is contained in function menu())
1. This function displays the options available to the user as per the screenshot
(Figure 1). The layout in the screenshot forms part of the specification.
2. An unformatted input accepts the users selection into the only variable allowed
in this function, which is Sel.
3|
SFD261S -2024- GA-Assessment (GA9)
3. A test should be performed to ensure that should the user enter an invalid input,
they will be warned with a message: Invalid option selected! For one second.
See screenshot (Figure 6).
4. No other inputs, calculations or function calls are allowed in this function.
5. Once you have tested this menu() function using a do/while lo

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

16.3 Describe the purpose of Canadian labour laws.

Answered: 1 week ago

Question

16.6 Outline the three waysto obtain union recognition.

Answered: 1 week ago

Question

16.5 Describe the five steps in a union organizing campaign.

Answered: 1 week ago