Home Page > > Details

COSC 2666 AssignmentGhostwriter ,C++ Programming AssignmentDebug ,Programming AssignmentGhostwriter ,Help With c/c++ Assignment Ghostwriter Statistics,,|

COSC 2666 Programming C Programming Assignment for Semester 1 2020
Do You Have This Condition?
This assignment contributes towards 15% of your assessment for Programming. It must be
submitted by Sunday 31st May 2020 to not incur any late submission penalty.
The mark for each part of the assignment is shown in brackets on the righthand side. The
total mark is 30.
To qualify for a mark, this assignment must be your own individual work. You may not copy
another person’s work or have another person write this assignment for you.
You may be required to authenticate your authorship of this assignment.
To complete this assignment, you will need to know how to:
• Validate input data;
• Call a function that you have written yourself;
• Use a Switch statement;
• Use do, for, if and if…else statements to make decisions;
• Indent your C program statements so that they are easy to follow and debug;
• Add sufficient comments to explain to a user, the different parts of the program;
• Input and display a string;
• Create a one-dimensional array.
• Using the escape characters \n, \t, and \b, design your exe program so that, for the
user, your screen display is clear and accurate;
• The exe program displays a warning that the program is only an academic exercise.
Include your name in the warning.
The Scenario
You are a medical scientist who is doing research on a condition (illness) of interest to
You will design a questionnaire, that a user can take, to determine whether he/she has
the condition and to determine how severe it is.
You will prompt for the user’s name and will include his/her name in your program
The questionnaire will have ten questions.
The questions will be a mixture of five multi choice and five yes/no answers.
You, as the programmer will give each answer a numerical rating based on the
importance of the answer.
You will also write code that checks that the answer to each question is valid.
The validity checks will be written as functions that are called during execution of the
You may choose a real condition but keep in mind that this is an exercise in C
programming. Keep the questions light-hearted (humorous) and impersonal. There is an
example questionnaire on the last page.
The user will have the option of repeating the questionnaire if he/she chooses to do so.
After the respondent has completed the questionnaire, the program will give a result
based on the total score and will recommend further treatment.
COSC 2666 Programming C Programming Assignment for Semester 1 2020
Do You Have This Condition?
Marking Scheme
You C code is clearly indented to make the corresponding begin and end braces align.
At least eight comments explain the uses of different sections of the C program. 2
You have prompted the user to enter his/her name as a string and have programmed
the name to be output with other results. 2
You have written, before the main() function, two validity functions, one for the
multichoice answers and one for the yes/no answers. 2
You have correctly called the validity functions. 2
The user cannot continue with the questionnaire until valid data is entered. 2
The score for each question is stored in a one-dimensional array. 2
A switch statement, with at least four case statements, is used to display a
recommendation to the user, dependent on the user’s score. 2
You have used a do…while statement to repeat a section of code, for example, to repeat
the questionnaire. 2
The exe program displays your name, a warning, a statement about its use and
instructions on its use for the user to see. 2
The C program has five multichoice questions with five alternatives each
and five Yes/No questions. 2
You have used \n, \t and \b to is ensure that your program output is tidy and clear. 2
The exe program is robust and does not crash if invalid data is entered. 2
The C program finds the total of all the values stored in the elements of the onedimensional
array. 2
The output displays the information to the individual user regarding the severity of
having the condition (based on the total score from the array and a switch statement)
and a recommendation for future treatment (based on the switch statement). 2
Total: 30
The files must be correctly named as a C program (not C++), an exe program and must
include your name and student number in the file names.
You must submit the C code and the exe program through CANVAS by the due date,
Sunday 31st May 2020.
If you are using an Apple computer, you must submit your C code file and a screen shot
of your working C program by the due date, Sunday 31st May 2020.
COSC 2666 Programming C Programming Assignment for Semester 1 2020
Do You Have This Condition?
An Example: Questionnaire for Plutophobia (fear of becoming wealthy).
Please make up your own questionnaire. Do not use these questions.
Question Type Answer Score
Do you have more than
$5.00 in your pocket?
You can see that a person with severe Plutophobia would get a score of 30 while
someone completely immune would score 0. This is not a serious questionnaire, just
something on which to base a teacher’s example. A recommendation for someone with
severe Plutophobia could be “exposure therapy”. He/she must place $1000 000.00
under his/her bed and leave it there for a week.
By the way, as far as I know, there are, currently, no known cases of “Plutophobia”.

Contact Us - Email:99515681@qq.com    WeChat:codinghelp2
© 2014 www.asgnhelp.com
Programming Assignment Help!