CMP1041 Foundation Programming
Read through the following scenario and respond by compiling a report addressing each of the sections and sub sections.
You work for a company called Medical Software Solutions Inc, who have recently finished a project for a local hospital. However the hospital deemed that the software your company delivered did not meet their strict quality requirements, and as stipulated in the contract they have decided to not use the provided software and to not pay your company for the time spent creating the software.
This has caused management to be upset as they were relying on that money to grow the company, the engineers are upset because they spent time working on a project that has now been thrown away, and everyone in the company is worried that their reputation has been hurt and that it will be harder to find clients in the future. Management has promoted you to the role of Chief Quality Officer, an engineering role that is in charge of ensuring that the quality of all future software projects is sufficient to meet the client’s expectations so that this situation is not repeated again.
Management wants to know the following:
1) What was the problem with the software that caused the hospital to deem that it did not meet their quality requirements?
2) What is your plan going forward for all future software projects to ensure the quality meets the clients expectations? To answer these questions compile a report that both management (non-technical people) and engineers will read with the following sections:
Discuss why testing is important, what could be the results of delivering buggy code in terms of cost to the company and the effect and risk on the user of the software. Specifically reference the code delivered in the project for the local hospital and why it could have ethical problems if bugs were to exist in the software regarding the impact to patients.
Section: Debugging Define and describe
1. What a bug is.
2. What debugging is and why debugging is challenging.
3. What a debugger is.
Provide a screenshot image of your desktop where you are debugging the provided C++ code that clearly shows breakpoints that will stop the execution of the program when an alert is sent, and when the blood pressure is determined. Provide details to the reader of the report detailing how each of your breakpoints will allow the reader of the report to understand about the program.
To place breakpoints use any IDE such as Visual Studio, or an online C++ debugger such as https://www.onlinegdb.com/online_c++_debugger.
Section: Bugs in hospital project
Review the flowchart, pseudocode, and C++ code from the hospital project and provide information of
1. The line number or flowchart node the bug occurs in.
2. What type of bug this is.
3. How the bug affects the program.
4. A fix for the bug.
The code has been provided on the following pages. 3
Section: Testing Plan
Subsection: Types of testing
Choose three (3) types of testing from the list below and describe
1. What that type of testing is.
2. Why it will improve the quality of future software.
● White Box testing.
● Black Box testing.
● Unit testing.
● Integration testing.
● Beta testing.
● Stress testing.
● Product testing.
● Performance testing.
● Smoke and sanity testing.
● Regression testing.
Subsection: Flowcharts & Pseudocode
You’ve noticed in your company that some engineers catch bugs in flowcharts easily, and find it hard to catch bugs in pseudocode. Other engineers are the opposite!
Enforce a rule that all algorithms will be provided in flowchart and pseudocode form. In your report:
1. Inform the reader of this rule.
2. Describe how providing both a flowchart and pseudocode version of an algorithm will increase the quality of the software.
3. Provide an example by converting the flowchart from the hospital project into pseudocode - your flowchart should contain no bugs or errors.
Subsection: Defect Life Cycle
You’ve noticed in your company that engineers find bugs but forget to fix them. In your report:
1. Describe what a defect life cycle is and how it provides value to the company.
2. Create a flowchart with the following life cycle states
New -> Assigned -> In Progress -> Completed -> Closed
New -> Assigned -> Won’t Fix -> Closed
3. Describe each state and when a defect should enter and leave the state.
Subsection: Software Quality Metrics
Management and engineers want to quickly inspect the quality of the software project without having to read each line of code. For the metrics listed below, in your report:
1. Describe the metric and how it will allow developers and managers to inspect the quality of the software.
2. Describe what the value of the metric should be in the best case, and the worst case. Describe why.
● Defect Density
● Defect Age
● System Availability
Provide a summary of the report and each of its sections. Describe why following the testing plan will increase the quality of future software and what effect that will have on the company.
This is the code provided to the local hospital for this project.
1: // If heart rate is 150 or above: alert staff as the patient may have tachycardia.
2: // If heart rate is below 60 or below: alert staff as the patient may have bradycardia.
3: GET heart_rate_of_patient
4: IF heart_rate_of_patient > 150
5: PROMPT “Alert: Patient may be experiencing tachycardia as heart rate is 150 or greater!”
6: IF heart_rate_of_patient <= 60
7: PROMPT “Alert: Patient may be experiencing tachycardia as heart rate is 60 or lower!”
// This would be hooked up to a blood pressure tester. For now return a test value.
// If blood pressure is 90 or below, alert staff as patient may have hypotension.
// If blood pressure is 140 or above, alert staff as patient may have hypertension.
int blood_pressure = get_blood_pressure();
if(blood_pressure > 90)
std::cout << "Alert: Patient's blood pressure is 90 or below!" << std::endl;
else if(blood_pressure <= 140)
std::cout << "Alert: Patient's blood pressure is 140 or above!" << std::endl;