Project 1 - Framingham Risk Score Calculator

Part 1: Project Design due September 18th (Section 2) or September 19th (Section 1), through Blackboard

Part 2: Project Code due September 25th (Section 2) or September 26th (Section 1), before class, through Blackboard.

Now that you have awesome programming skills, you have turned down all the offers from tech companies, hedge funds, and consulting firms to focus on helping people. You are now working with a group of epidemiologists on a study to help prevent, detect, and treat heart disease in a cohort of women.

The women in this study range in age from 20 to 79. As each is enrolled in the study, they have an interview with a clinical research associate. The CRA performs some lab tests and then interviews the subject to get other information. Once that is done, they need to compute the Framingham Risk Score to discuss with the subject. This is where you come in.

They need to have someone to create an application they can use to compute the score as shown in the Wiki page linked to above. Please notice the following things:

  • All the subjects are female, so you do not have to compute a score for men.
  • None of the subjects are being treated for their blood pressure.
  • Subjects range in age from 20 to 79
  • The possible range of total cholesterol is 130 to 320
  • The possible range of HDL cholesterol is 20 to 100
  • The possible systolic blood pressure range is 90 to 300

Here is some sample output from a program that implements the scoring system: fear 25> ./framingham.exe Framingham Risk Score Calculator Please have the following subject information at hand: - Age - Smoker status - Total Cholesterol - HDL Cholesterol - Age - Systolic Blood Pressure Please enter the patients age: 47 Is the patient a smoker (Y/N)?: y Please enter the patients total cholesterol: 140 Please enter the patients HDL cholesterol: 45 Please enter the patients systolic blood pressure: 120 Total points: 12 This patient has a 1% chance of developing cardiovascular disease in the next ten years.

You can run this program and experiment with it to test it on your own. You can copy my version of the program to your directory and then run it To do so, log into the cs-class machine and type the commands:

cp ~clay/framingham.exe ~/ ./framingham.exe

Part 1 - Design Document

For the first part you are to submit a design document showing the algorithm you plan to implement. DO NOT SUBMIT A FLOWCHART. Instead, type it up neatly using a language which is similar to that from Homework 1 and has the following terms:
  • start
  • input
  • output
  • calculate
  • if condition, then statement
  • if condition, then statement; otherwise, statement
  • switch value:
    case value: statement
    case value: statement
    ...
    case value: statement
    otherwise: statement
    end switch
  • stop
If you need to group multiple statements together, say in an if or case situation where you need more than one statement for the case, use
    begin
       statement
       ...
       statement
    end

Note that you do not need to specify what constants and variables you will be declaring in C++ in this algorithm; if you use an understandable, meaningful name that others can understand for a calculation, that is fine.

A copy of your algorithm is due before class on the 20th through Blackboard. You should submit it as a single PDF file. If you don't know how to create PDF, you can either use pdfforge on Windows, or just choose Print and then save as PDF using a Mac.

Part 2 - Program Source Code

Important: Your output and input should be very similar to that shown in the example program. Please ask for the input in exactly the same order shown and only request the same items shown - do not ask for any other input. This will assist in grading your program.

I expect your program to have the following features, similar to the one that you can run to compare your program to:

  • All input must be checked to make sure that the values are reasonable. For now, if you detect unreasonable input, the program can just print an error message and halt. You do not have to detect type errors, such as people entering letters where the program expects numbers.
  • You should declare values that are fixed as const and use the declared constants in your calculations. There are many of these in this project
  • Your output should be neat and aligned similarly to that of the example above and of the example program.

Include the following header at the start of your source code. /** * Project 1 * Name <your name> * Netid: <your netid> * COSC 051 * Section:

* In accordance with the class policies and Georgetown's Honor Code, * I certify that I have neither given nor received any assistance * on this project with the exceptions of the lecture notes and those * items noted below. * * Any help items (you may omit mentions of the TAs, the professors, * or the recommended text): * * Description: <Describe your program> * **/

You will submit your source code through Blackboard. This is the .cc file. Do not submit the compiled version! I don't speak binary very well.