Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE USE C++ #include using namespace std; #define SIZE 5 // Max size of the array int count = 0; // global variable to count

PLEASE USE C++

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

#include using namespace std; #define SIZE 5 // Max size of the array int count = 0; // global variable to count student's // mark info added into the array // Function prototypes. The formatName, press Enter, getGrade and // getTask were already implemented. Only need to complete the rest 17 after getTask. void formatName(string &); void press Enter(); char getGrade(int); int getTask(); void addMarkInfo(string [], int [][2]); void listMarkInfo(string n[SIZE], int m[][2]); void viewResults(string n[SIZE], int m[][2], int s); void viewReports(string n[SIZE], int m[][2]); // Start main function int main() { // The next 2 array variables are to be used as parallel array string names [SIZE]; // 1 dimensional array to store student's names int marks[SIZE][2]; // 2 dimensional array to store coursework and final exam marks int task = get Task(); while (task != 5 ) { switch (task) { case 1: addMarkInfo(names, marks); break; case 2: listMarkInfo(names, marks); break; case 3: viewResults (names, marks, count); break; case 4: viewReports(names, marks); } task = get Task(); count); break; case 4: viewReports(names, marks); } task = getTask(); } return 0; } 1/ start user-defined functions implementations // function to format student's name so it has at least 25 Il characters including the trailing space bar characters void formatName(string &n) { int strlen = n.length(); if (strlen = 85) return 'A': if (m >= 70) return 'B'; if (m >= 55) return 'C'; if (m >= 40) return 'D' return 'E'; } 1/ only allow users to choose the option from 1 to 5 int sett 1/ only 5 levels of grades (A, B, C, D & E) char getGrade(int m) { if (m >= 85) return 'A'; if (m >= 70) return 'B'; if (m >= 55) return 'C'; if (m >= 40) return 'D'; return 'E'; } 1/ only allow users to choose the option from 1 to 5 int get Task() { int t = 0; cout 5) { cout > t; } cout

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 24th International Conference Dexa 2013 Prague Czech Republic August 2013 Proceedings Part 2 Lncs 8056

Authors: Hendrik Decker ,Lenka Lhotska ,Sebastian Link ,Josef Basl ,A Min Tjoa

2013th Edition

3642401724, 978-3642401725

More Books

Students also viewed these Databases questions

Question

Describe the linkages between HRM and strategy formulation. page 74

Answered: 1 week ago

Question

Identify approaches to improving retention rates.

Answered: 1 week ago