Categories: Uncategorized

Assignment Paper

Lab 1 – User Input

1 Introduction This lab introduces the development of a simple C++ program using the Standard Library and the C++ Programming language in a Windows (Microsoft Visual Studio) development environment.

2 Design Problem Develop a software system that will help an Instructor at BCIT enter their course marking. The software system will read as input from the console for each student their student number (char array), the lab grade (float), the quiz grade (float), the midterm grade (float), and the final exam grade (float). Each grade is a percentage out of 100, with the lab worth 40% of the course, the quiz 10%, the midterm 20% and the final exam 30%. Create a C struct which holds each grade variable and assume the maximum class size is 100 students (array of 100), stored as a global variable. Use a number_of_students variable to keep track of the number of students in the class. The software system should have a simple text menu which allows you to (A)dd a student, (E)dit a student, (P)rint all the students data including the final course grade to the screen and (Q)uit to exit. Display the main menu after each operation. An example of the system operation is shown below. The design above commits several programming crimes (global variables, fixed 100 array, etc) which will be fixed in the next lab.

3 Design Process Develop the program described above all within one main.cpp file using the Microsoft Visual Studio IDE. Each menu option should be executed in its own function (add_student, edit_student, print_menu, print_grades). Note that adding a student is the same as creating a new blank student and then editing that student (i.e. don’t duplicate the edit code).

4 Pre Lab Work (1) Prior to coming to the lab, complete the following tasks: A) Write the menu display portion of the project outlined above (print menu and wait for input). The menu should be printed with a function print_menu and the other functions should be stubs (create as an empty function, you don’t need to add any code for the pre lab mark). At the start of lab, demo the menu display operation.

5 Lab Completion Demo (3) Demonstrate the operation of the system by adding 3 students, then edit 1 student and print the grades. Copy your CPP and H files into the lab hand in folder on D2L.

ELEX 4618: Object Oriented Design Lab 1

Craig Hennessey 11/12/2022 2

6 Example Operation ****************************************

ELEX4618 Grade System, by STUDENT NAME

****************************************

(A)dd student

(E)dit student

(P)rint grades

(Q)uit

CMD> A

Adding Student

Student Number: A00512345 Lab Grade: 77 Quiz Grade: 55.5 Midterm Grade: 66 Final Exam Grade: 80

****************************************

ELEX4618 Grade System, by STUDENT NAME

****************************************

(A)dd student

(E)dit student

(P)rint grades

(Q)uit

CMD> P

# Student Lab Quiz Midterm Final Exam Final Grade 1 A00512345 77.0 55.5 66.0 80.0 73.55

****************************************

ELEX4618 Grade System, by STUDENT NAME

****************************************

(A)dd student

(E)dit student

(P)rint grades

(Q)uit

CMD> E

Student to edit: 1

Student Number: A00512345 Lab Grade: 77 Quiz Grade: 55.5 Midterm Grade: 66 Final Exam Grade: 60

Lab 1 – User Input
1 Introduction
2 Design Problem
3 Design Process
4 Pre Lab Work (1)
5 Lab Completion Demo (3)
6 Example Operation

admin

Share
Published by
admin

Recent Posts

Childbirth

For this short paper activity, you will learn about the three delays model, which explains…

8 months ago

Literature

 This is a short essay that compares a common theme or motif in two works…

8 months ago

Hospital Adult Medical Surgical Collaboration Area

Topic : Hospital adult medical surgical collaboration area a. Current Menu Analysis (5 points/5%) Analyze…

8 months ago

Predictive and Qualitative Analysis Report

As a sales manager, you will use statistical methods to support actionable business decisions for Pastas R Us,…

8 months ago

Business Intelligence

Read the business intelligence articles: Getting to Know the World of Business Intelligence Business intelligence…

8 months ago

Alcohol Abuse

The behaviors of a population can put it at risk for specific health conditions. Studies…

8 months ago