For our final project, we wanted to focus on file reading and writing, object oriented programming, and dynamic memory. To do this, we thought that some sort of tutorial program would best fit what we wanted to accomplish. After some brainstorming, we decided that creating a program that is focused on CPR would be a good start. Outputting the appropriate steps to performing CPR and then asking questions in a "quiz" format afterwards would be the direction of our program. The purpose of this is to educate the user about the proper way of performing CPR, something that not many people know how to properly do, or what to do if such a scenario occurred. It is a simple program that anyone can use.
Our code utilizes user input and file reading to create a quiz that revolves around the steps to perform CPR. The program outputs the steps to the user, and tells them that they will be asked questions related to the steps. Each time the user answers a question, their answer is stored on a new file, and their answers are compared to the correct answer stored in a separate file. For each correct answer, they get 10 points. In total, the user can get 100 points possible. After the user answers all questions, their total score will be displayed on screen.
The main part of our program is the ability to read and display the files onto the screen. It is the main focus of our project, since it is the most efficient way to run our program. Storing the user answer and each line from each file is another large part of the project. We were able to do each successfully and revolve it around how we wanted to execute our code.
No comments:
Post a Comment