1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Katen [24]
3 years ago
6

1. The system must be able to manage multiple students (max of 15) and their grades for assignments from three different assignm

ent groups: homework (total of 5), quizzes (total of 5), and exams (total of 3).
2. For each student record, the user should be able to change the grade for any assignment. These grades should be accessible to the gradebook for calculations, but not visible or directly mutable outside of the student record.

3. The gradebook should know the name of the course. It should also know the weights of each assignment group and be able to print a report to the screen. This report should contain the course name and a well-formatted table containing columns for the student names, and for each assignment group. The group weights should be displayed (as a percentage) next to the name of each assignment group in the table’s header. It should be possible to add and remove students from the gradebook, and the maximum number of students supported is 15. Removals from the gradebook should shift each successive student "up" in the list. For example, if student 5 is removed from the gradebook, the remaining students starting
with student 6 should be moved up a slot (i.e. student 6 to student 5’s old slot, student 7 to student 6’s old slot, etc.)

4. A user interface should be created with a menu system used to navigate the functionality necessary to complete the stated requirements. It is recommended to use a simple numbering scheme when prompting the user for their desired action. See the end of this project sheet for a reference you may use for the menus.

5. All names (student names, gradebook name) should be set to "" prior to being set by the user. This could also be used in logic to determine whether or not a student entry in the gradebook is "valid". Empty student slots should not be displayed in menus that require the user to identify a student record to modify.

6. The gradebook should be able to calculate class averages from the student records. The averages are the sum of the valid grades divided by the total number of valid grades for that group (i.e. ungraded assignments are not part of the total number of valid grades). Since each student record could contain a different number of grades for each category, the class average should be computed as the average of each student’s average for each assignment group as well as their final grade. When computing the average final grade, don’t forget to use the group weights

-=| MAIN MENU |=-
1. Add a student
2. Remove a student
3. Change a student’s grade
4. Change group weights
5. Change the gradebook name
6. Display class averages
7. Display full report
0. QUIT

Enter an action: 1


-=| ADDING STUDENT |=-
Please enter the student’s name: Name Here

Name Here was successfully added to the gradebook!

-=| ADDING STUDENT |=- Students cannot be added because the gradebook is full!
-=| REMOVING STUDENT |=-
1. John Doe
2. Jane Doe
3. Third Person

Enter student to remove: 1

"John Doe" has been successfully removed! (New class size: 2)

-=| REMOVING STUDENT |=- Cannot remove students because the gradebook is empty!


-=| CHANGING GRADE |=-
1. Change a homework grade
2. Change a quiz grade
3. Change an exam grade

What type of grade would you like to change: 2

1. John Doe
2. Jane Doe
3. Third Person
Which student’s grade would you like to change? 3

-=| CHANGING Third Person’s QUIZ GRADE |=-
1. 68
2.
3. 97
4.
5.

Which quiz grade would you like to change: 2
What would you like to change it to (-1 for ungraded): 89

Third Person’s quiz grade 2 was changed from to 89!




-=| CHANGING WEIGHTS |=-
Enter the weights, separated by spaces, in the order of homework, quizzes, and exams (total must add up to 1.0):
0.15 0.25 0.7
Weights do not add up to 1.0, try again...

Enter the weights, separated by spaces, in the order of homework, quizzes, and exams (total must add up to 1.0):
0.15 0.2 5 0.6
Weights updated successfully!

-=| CHANGING NAME |=-
Please enter the new name for the gradebook: COP3014


Gradebook name changed from "" to "COP3014"

-=| CLASS AVERAGES |=-
Homework average of class: 85.13%
Quiz average of class: 81.57%
Exam average of class: 77.40%
Final average of class: 79.60%


-=| GRADEBOOK REPORT |=-
Course: COP3014
Quiz average of class: 81.57%
Exam average of class: 77.40%
Final average of class: 79.60%

Student | Homework (15%) | Quizzes (25%) | Exams (60%) | HW AVG | Quiz Avg | Exam Avg | Final Grade |
-----------------|------------------|-----------------|-----------------|--------|----------|----------|-------------|
John Doe | 82 71 87 94 UG | . . . | . . . | 83.50 | . . . | . . . | . . . |
Jane Doe | 87 78 92 UG UG | . . . | . . . | 85.67 | . . . | . . . | . . . |
Third Person | 83 UG 85 UG UG | . . . | . . . | 84.00 | . . . | . . . | . . .

programming language is C++
Engineering
1 answer:
mr_godi [17]3 years ago
6 0

Answer:

#include<iostream>

#include<string.h>

using namespace std;

class gradebook;

class student

{

friend class gradebook;

char name[20]; // std name

int homework_grades[6], quiz_grades[6], exam_grades[4]; //grades array

float homework_avg, quiz_avg, exam_avg, final_avg;

};

class gradebook

{

student list[16];

public:

char gb_name[20]; // gradebook name

int max, total;

// Constructor

gradebook()

{

strcpy(gb_name,"noname");

max = 5;

total = 0;

for(int i=1;i<=15;i++)

{

strcpy(list[i].name,"noname");

for(int j=1;j<=5;j++)

{

list[i].homework_grades[j] = -1;

list[i].quiz_grades[j] = -1;

}

list[i].exam_grades[1] = list[i].exam_grades[2] = list[i].exam_grades[3] = -1;

}

}

// Member functions

void display_std_name();

void display_grades(int, int);

int add_std(char *new_name);

int remove(int);

//int ch_grade(int, int);

};

// Define all functions

// Remove a student from list and adjust remaining

int gradebook::remove(int std_id)

{

if(total==0 || std_id>total || std_id<=0)

return 0;

if(std_id==total)

{

cout<<"\n“"<<list[std_id].name<<"” has been successfully removed! (New class size: 2)";

strcpy(list[total--].name,"noname");

return 1;

}

cout<<"\n“"<<list[std_id].name<<"” has been successfully removed! (New class size: 2)";

for(int i=std_id; i<total; i++)

{

list[i]=list[i+1];

}

total--;

return 1;

}

// Add student to gradebook

int gradebook::add_std(char *new_name)

{

if(total<15)

{

strcpy(list[++total].name, new_name);

return 1;

}

return 0;

}

// Display student name list

void gradebook::display_std_name()

{

for(int i=1;i<=total;i++)

{

cout<<"\n"<<i<<" "<<list[i].name;

}

}

/* Display grades of students

// (grade_id, student_number_in_list)

homework(1), quiz(2), exam(3)

*/

void gradebook::display_grades(int g_id, int std_id)

{

int i;

if(std_id<=total)

{

if(g_id==1)

{

for(i=1;i<6;i++)

{

cout<<"\n"<<i<<". ";

if(list[std_id].homework_grades[i]==-1) cout<<"<ungraded>";

}

}

else if(g_id==2)

{

for(i=1;i<6;i++)

{

cout<<"\n"<<i<<". ";

if(list[std_id].quiz_grades[i]==-1) cout<<"<ungraded>";

}

}

else if(g_id==3)

{

for(i=1;i<4;i++)

{

cout<<"\n"<<i<<". ";

if(list[std_id].exam_grades[i]==-1) cout<<"<ungraded>";

}

}

}

else

cout<<"\nNo such std exists";

}

/****************************** MAIN ****************************/

int main()

{

int main_choice, grade_choice, std_id, new_grade;

char g_name[20], s_name[20];

float a,b,c;

gradebook g;

do

{

cout<<"\n\n-=| MAIN MENU |=-";

cout<<"\n1. Add a student\n2. Remove a student\n3. Change a student’s grade\n4. Change group weights\n5. Change the gradebook name\n6. Display class averages\n7. Display full report\n0. QUIT\n";

cout<<"\nEnter an action: ";

cin>>main_choice;

switch(main_choice)

{

case 0:

break;

case 1:

cout<<"\n-=| ADDING STUDENT |=-";

cout<<"\nPlease enter the student’s name: ";

cin>>s_name;

if(g.add_std(s_name))

cout<<"\n"<<s_name<<" was successfully added to the gradebook!";

else

cout<<"\nStudents cannot be added because the gradebook is full!";

break;

case 2:

cout<<"\n-=| REMOVING STUDENT |=-";

if(g.total!=0)

{

g.display_std_name();

cout<<"\n Enter student to remove: ";

cin>>std_id;

if(!g.remove(std_id))

cout<<"\nCannot remove students";

}

else

cout<<"\nStudents cannot be added because the gradebook is full!";

break;

case 3:

cout<<"\n-=| CHANGING GRADE |=-\n1. Change a homework grade\n2. Change a quiz grade\n3. Change an exam grade";

cout<<"\nWhat type of grade would you like to change: ";

cin>>grade_choice;

g.display_std_name();

cout<<"\nWhich student’s grade would you like to change? ";

cin>>std_id;

//ch_grade(grade_choice, std_id);

g.display_grades(grade_choice, std_id);

break;

/*

case 4:

cout<<"\n-=| CHANGING WEIGHTS |=-";

while(1)

{

cout<<"\nEnter the weights, separated by spaces, in the order of homework, quizzes, and exams (total must add up to 1.0):";

cin>>a>>b>>c;

if(a+b+c==1.00)

break;

else

cout<<"\n Weights do not add up to 1.0, try again...";

}

break;

case 5:

cout<<"\n-=| CHANGING NAME |=-\nPlease enter the new name for the gradebook: ";

cin>>g_name;

cout<<"\n Gradebook name changed from “ ” to "<<g_name;

break;

case 6:

cout<<"\n-=| CLASS AVERAGES |=-";

cout<<"\nHomework average of class: ";

cout<<"\nQuiz average of class: ";

cout<<"\nExam average of class: ";

cout<<"\nFinal average of class: ";

break;

case 7:

break;

*/

default:

cout<<"\n\nInvalid input\n\n";

}

}while(main_choice!=0);

return 0;

}

Explanation:

You might be interested in
Un vendedor de camiones quiere suspender un vehículo de 4000 kg como se muestra en la figura, con fines publicitarios. La distan
Rina8888 [55]

Answer:

english

Explanation:

3 0
3 years ago
The amplitudes of the displacement and acceleration of an unbalanced motor were measured to be 0.15 mm and 0.6 g, respectively.
PilotLPTM [1.2K]

Answer:

N=945.76 RPM

Explanation:

Given that

A= 0.15 m

Acceleration = 0.6 g

a=0.6 x 9.81 m/s²

a= 5.886 m/s²

We know that acceleration a given as

a = ω² A

ω=Angular speed

\omega=\sqrt{\dfrac{0.6\times 9.81}{0.6\times 10^{-3}}}

 ω=99.04 rad/s

We know that

\omega=\dfrac{2\pi N}{60}\\\\N=\dfrac{60\times \omega}{2\pi }

N=\dfrac{60\times 99.04}{2\pi }

N=945.76 RPM

Therefore the speed of the motor will be 945.76 RPM.

6 0
4 years ago
Section lines represent surfaces exposed by a cutting plane<br> a. True b. False
oksian1 [2.3K]

Answer:

these is very interesting question but I still know the answer is a. True

7 0
3 years ago
A 10.2 mm diameter steel circular rod is subjected to a tensile load that reduces its cross- sectional area to 52.7 mm^2. Determ
VMariaS [17]

Answer:

The percentage ductility is 35.5%.

Explanation:

Ductility is the ability of being deform under applied load. Ductility can measure by percentage elongation and percentage reduction in area. Here, percentage reduction in area method is taken to measure the ductility.

Step1

Given:

Diameter of shaft is 10.2 mm.

Final area of the shaft is 52.7 mm².

Calculation:

Step2

Initial area is calculated as follows:

A=\frac{\pi d^{2}}{4}

A=\frac{\pi\times(10.2)^{2}}{4}

A = 81.713 mm².

Step3

Percentage ductility is calculated as follows:

D=\frac{A_{i}-A_{f}}{A_{i}}\times100

D=\frac{81.713-52.7}{81.713}\times100

D = 35.5%.

Thus, the percentage ductility is 35.5%.

5 0
3 years ago
Given a dictionary d and a list lst, remove all elements from the dictionary whose key is an element of lst. For example, given
NikAS [45]

Answer:

d = {1:2, 3:4, 5:6, 7:8}

list = [1, 7]

not_found = set()

for x in list:

  if x not in d.keys():

     not_found.add(x)

  else:

     del d[x]

print(d)

print(not_found)

6 0
3 years ago
Other questions:
  • In a Rankine cycle, superheated steam that enters the turbine at 1273.15 K and 1.8 MPa is then expanded to a vapor at 0.1 MPa. W
    7·1 answer
  • Koch traded Machine 1 for Machine 2 when the fair market value of both machines was $60,000. Koch originally purchased Machine 1
    10·1 answer
  • To be able to solve problems involving force, moment, velocity, and time by applying the principle of impulse and momentum to ri
    9·2 answers
  • The speed of ac motors is primarily<br>determined by which two factors?<br>​
    12·1 answer
  • A good rule of thumb is to design the horizontal stabilizer so that its area is about 1/6 to 1/8 of the area of the wing. If the
    11·1 answer
  • A horizontal curve on a two-lane road is designed with a 2,300-ft radius, 12-ft lanes, and a 65-mph design speed. Determine the
    11·1 answer
  • Daniel Wiseman, a scientist for Gres-Trans Corp., wants to determine if the flow rate of a particular material changes with diff
    9·1 answer
  • if you help then I will thank u by sooo much I will give tons of points but the answer has to be right.
    9·2 answers
  • The in-situ dry density of a sand is 1.72Mg/m3. The maximum and minimum drydensities, determined by standard laboratory tests, a
    5·1 answer
  • 7–2 Cooling of a Hot Block by Forced Air at High
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!