Question

For this assignment we are going to create the beginnings of a simple Grade Book. We...

For this assignment we are going to create the beginnings of a simple Grade Book. We will revisit this assignment again once we learn some new concepts. For the purposes of this grade book you should first provide a menu with the following options:

1. Add a new course

2. Add a new student

3. Add a student to a course

4. Add grades for a student in a course

5. Print a list of all grades for a student in a course

6. Print a list of all students in a course

7. Compute the average for a student in a course

8. Print a list of all courses

9. Print a list of all students

10. Compute the average for a course

11. Store Grade book (to a disk file)

12. Load Grade book (from a disk file)

Each of these menu items should correspond to a function you will write. For this basic program each student will be represented by an ID number, and each course by a course number. No other date is required to represent a course or student at this time. Grades will be whole numbers only (no fractional part) As indicated in the menu you will need to store and load using a disk file so that the data is retained. Here are some limiting values to help you in defining your data: • Maximum Number of students (total) 100 • Max number of courses 25 • Max number of courses per student 4 • Max number of grades per student per course 10 Be s

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The following is the required programs as per the requirements in the question.

Code to copy is given at the end. Get back to me if you have any doubt.

Screenshot of the Program Code:

Header.h:

Header.h X ConsoleApplication71.cpp ConsoleApplication71 1 #pragma once //header.h #include #include #include <iostream» <cst// add a course 34 35 void add_course(student* s, course* c); 36 37 38 void add student(student s, course* c); 39 40 41 void

FunDef.cpp

//FunDef.cpp 旧#include stdafx.h 4. #include headerh using namespace std; int num, courses = 0, num-students, COURSES = 2

41 42 43 // add course to grade book c [num_courses].nam name; c[num_courses].id- number; 2 // confirm course addition cout <54 void add-student(student* s, course* c) 56 57 58 int number; string fname, lname; cout << This option allows you to add a// add student to grade book s(num-students].id = number; s[num students].Iname !name; s [num students].fname = fname; 86 87100 Evoid student to_course (student* s, course* c) 101 102 103 104 105 106 107 108 109 110 float *pstudent nullptr; string c139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 1178 179 180 case 0: // point class roll to the student grade book address c[i].enrolled students[0]pstudent; // increment cla219 220 221 // point class roll to the student grade book address c[i].enrolled. Students [4] = pstudent; // increment class258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 2298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 case 12: // point class roll to the student grade book addres338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 case 16: // point class roll to the student grade book address с[default: 378 379 380 381 382 383 384 385 386 387 cout << n****n cout << Course is full.\n; cout <<n return; return;388 389 void add grades (student s, course* c) 390 391 392 393 394 395 396 397 398 399 400 曰for (int i = 0; ǐ < STUDENTS ; i+if (cnamec[i].name && cnumberc[i].id) 428 429 430 431 E 432 433 434 435 436 437 438 439 440 441 442 443 // search enrollments466 467 468 E 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 // if students third grade book is489 void 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518528 529 530 search enrollments. this is another section I could have written better. I could have made use of the enrollment568 569 570 571 572 573 574 575 576 cout << Student not enrolled in class.In; return return;577 578 void print students in_course(student* s, course* c) 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 6void student avg(student*s, course* c) 655 656 657 658 659 660 661 662 663 664 665 string cname; int cnumber, snumber, studen// search enrollments in course for (int j = 0; j < ENROLLMENT; j++) 695 696 697 698 699 700 701 702 703 704 705 706 707 708734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 7767 768 769 770 // if student is not enrolled in course else if (j-ENROLLMENT) 1 772 773 774 775 776 cout << Student not enr81 782 Evoid print_courses (student* s, course* c) 783 784 785 786 787 788 789 790 791 void print_students (student s, course800 void course avg(student s, course* c) 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 8879 880 881 882 883 884 885 886 887 sum += s[student-grading] . grades4[m]; // get average avg (float)sum/ MAXGRADES; sum = 0903 904 曰void 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 save. Sfor (int m0; m <MAXGRADES; m+t) 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 9982 983 984 985 986 987 988 989 990 991 992 993 994 995 L 996 // write zeros to file if student not enrolled in other courses996 997 998 void load-stream(ifstream& infile, student s, course* c) float *pstudent; string cname, temp; char input_file[201034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 10581074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 10981113 1114 1115 1116 // point class roll to the student grade book address c[k].enrolled_students [1]pstudent; // increment cl1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 // if seven people are enrolled inс[k].enrolled. Students [12] pstudent; // increment class counter c[k].roll++; break; // if thirteen people are enrolled in t// if eighteen people are enrolled in the course 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 11270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 for (int n = 0; n < (MAXGRADES - 1); n++) 5[i].grades4fn] = grade

main.cpp:

// ConsoleApplication71.cpp : Defines the entry point for the console application. //main.cpp #include stdafx.h #include h38 39 10 switch (user_input) case 1 add course(student_body, course_catalog); case 2: add student (student_body, course_catal

Screenshot of the Sample Output:

c:lusers ravikumaridocumentslvisual studio 20151ProjectsłConsoleApplication71\Debug Console... Grade Book Options 1. Add a coGrade Book Options 1. Add a course 2. Add a student 3. Add a student to a course 4. Add grades for a student in a course 5. PThis option inputs grades for a student in a course What is the students ID number? 01 What is the course nae computersciencThis option allows you to view all enrolled students in a course Enter a course name computerscience Enter course number 0001Course Hame Course Humber computerscience Grade Book Options 1. Add a course 2. Add a student 3. Add a student to a course 4.Grade Book Options 1. Add a course 2. Add a student 3. Add a student to a course 4. Add grades for a student in a course 5. PGrade Book Options 1. Add a course 2. Add a student 3. Add a student to a course 4. Add grades for a student in a course 5. P

Code to Copy:

Header.h:

#pragma once

//header.h

#include <iostream>

#include <cstdlib>

#include <string>

#include <iomanip>

#include <fstream>

struct student

{

std::string lname;

std::string fname;

int id;

float grades1[10];

float grades1_avg;

float grades2[10];

float grades2_avg;

float grades3[10];

float grades3_avg;

float grades4[10];

float grades4_avg;

int class_count;

};

struct course

{

std::string name;

int id;

float *enrolled_students[20];

int roll;

};

// add a course

void add_course(student* s, course* c);

// add a student

void add_student(student* s, course* c);

//Add a student to a course

void student_to_course(student* s, course* c);

//Add grades for a student in a course

void add_grades(student* s, course* c);

//Print a list of all grades for a student in a course

void print_grades(student* s, course* c);

//Print a list of all students in a course

void print_students_in_course(student* s, course* c);

//Compute the average for a student in a course

void student_avg(student* s, course* c);

//Print a list of all courses

void print_courses(student* s, course* c);

//Print a list of all students

void print_students(student* s, course* c);

//Compute the average for a course

void course_avg(student* s, course* c);

//Store gradebook

void save_stream(std::ofstream& out_file, student* s, course* c);

//Load gradebook

void load_stream(std::ifstream& in_file, student* s, course* c);

FunDef.cpp

//== == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == == ==

//FunDef.cpp

#include "stdafx.h"

#include "header.h"

using namespace std;

int num_courses = 0, num_students, COURSES = 25, STUDENTS = 100,

ENROLLMENT = 20, MAXCLASSES = 4, MAXGRADES = 10;

// add courses to grade book

void add_course(student* s, course* c)

{

string name;

int number, i;

cout << "\n********************************************************\n";

cout << "This option allows you to add a course to the catalog.\n";

cout << "********************************************************\n\n";

cout << "What is the course name? "; cin >> name;

cout << "What is the course number? "; cin >> number;

for (int i = 0; i < (num_courses); i++)

{

// if course does exist

if (number == c[i].id && name == c[i].name)

{

cout << "\n******************************\n";

cout << "Course already exists.\n";

cout << "******************************\n";

return;

}

}

// if grade book is full

if (num_courses == COURSES)

{

cout << "\n**************************************************************\n";

cout << "You have reached the course limit. Please select a new option.\n";

cout << "**************************************************************\n";

return;

}

// add course to grade book

c[num_courses].name = name;

c[num_courses].id = number;

// confirm course addition

cout << endl << c[num_courses].name << " "

<< c[num_courses].id << " added as a course.\n";

// increment grade book course counter

num_courses++;

return;

}

void add_student(student* s, course* c)

{

int number;

string fname, lname;

cout << "\n***********************************************************\n";

cout << "This option allows you to add a student to the student body.\n";

cout << "************************************************************\n\n";

cout << "What is the student's name(Last, First)? "; cin >> lname >> fname;

cout << "What is the student's ID? "; cin >> number;

// search existing students for repeat

for (int i = 0; i < num_students; i++)

{

// if student already exists

if (number == s[i].id)

{

cout << "\n******************************\n";

cout << "Student already exists.\n";

cout << "******************************\n";

return;

}

}

// if grade book is full

if (num_students == STUDENTS)

{

cout << "\n***************************************************************\n";

cout << "You have reached the student limit. Please select a new option.\n";

cout << "***************************************************************\n";

return;

}

// add student to grade book

s[num_students].id = number;

s[num_students].lname = lname;

s[num_students].fname = fname;

// confirm addition of student

cout << endl << s[num_students].lname << ", " << s[num_students].fname << " "

<< s[num_students].id << " added as a student.\n\n";

// increment grade book student counter

num_students++;

return;

}

void student_to_course(student* s, course* c)

{

float *pstudent = nullptr;

string cname;

int snumber, cnumber, student_name, student_enrollment, course_enrollment = 0;

cout << "\n******************************************\n";

cout << "This option enrolls a student in a course.\n";

cout << "******************************************\n";

cout << "\nWhat is the student's ID#? "; cin >> snumber;

cout << "\n************************\n\n";

cout << "What is the course name? "; cin >> cname;

cout << "What is the course number? "; cin >> cnumber;

// search for student in grade book

for (int i = 0; i < num_students; i++)

{

// if student is found in gradebook

if (snumber == s[i].id)

{

student_enrollment = s[i].class_count;

// check number of classes student is enrolled in

switch (student_enrollment)

{

case 0:

pstudent = &s[i].grades1[0];

// increment student enrollment counter

s[i].class_count++;

break;

// if student is enrolled in one class

case 1:

// get address of second student grade book

pstudent = &s[i].grades2[0];

// increment student enrollment counter

s[i].class_count++;

break;

// if student is enrolled in two classes

case 2:

// get address of second student grade book

pstudent = &s[i].grades3[0];

// increment student enrollment counter

s[i].class_count++;

break;

// if student is enrolled in three classes

case 3:

// get address of third student gradebook

pstudent = &s[i].grades4[0];

// increment student enrollment counter

s[i].class_count++;

break;

default:

// student cannot be enrolled in any more classes

cout << "Student enrolled in maximum classes.\n";

return;

}

}

// if student cannot be found

else if (i == num_students)

{

cout << "\n******************\n";

cout << "Student not found.\n";

cout << "******************\n";

return;

}

}

// search for class

for (int i = 0; i < num_courses; i++)

{

// found class

if (cname == c[i].name && cnumber == c[i].id)

{

// get course enrollment counter

course_enrollment = c[i].roll;

// check course enrollment counter

switch (course_enrollment)

{

// if no one is enrolled in the class

case 0:

// point class roll to the student grade book address

c[i].enrolled_students[0] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if one person is enrolled in the class

case 1:

// point class roll to the student grade book address

c[i].enrolled_students[1] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if two people are enrolled in the class

case 2:

// point class roll to the student grade book address

c[i].enrolled_students[2] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if three people are enrolled in the class

case 3:

// point class roll to the student grade book address

c[i].enrolled_students[3] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if four people are enrolled in the course

case 4:

// point class roll to the student grade book address

c[i].enrolled_students[4] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if five people are enrolled in the course

case 5:

// point class roll to the student grade book address

c[i].enrolled_students[5] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if six people are enrolled in the course

case 6:

// point class roll to the student grade book address

c[i].enrolled_students[6] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if seven people are enrolled in the course

case 7:

// point class roll to the student grade book address

c[i].enrolled_students[7] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if eight people are enrolled in the course

case 8:

// point class roll to the student grade book address

c[i].enrolled_students[8] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if nine people are enrolled in the course

case 9:

// point class roll to the student grade book address

c[i].enrolled_students[9] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if ten people are enrolled in the course

case 10:

// point class roll to the student grade book address

c[i].enrolled_students[10] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if eleven people are enrolled in the course

case 11:

// point class roll to the student grade book address

c[i].enrolled_students[11] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if twelve people are enrolled in the class

case 12:

// point class roll to the student grade book address

c[i].enrolled_students[12] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if thirteen people are enrolled in the class

case 13:

// point class roll to the student grade book address

c[i].enrolled_students[13] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// point class roll to the student grade book address

case 14:

// point class roll to the student grade book address

c[i].enrolled_students[14] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if fifteen people are enrolled in the class

case 15:

// point class roll to the student grade book address

c[i].enrolled_students[15] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if sixteen people are enrolled in the class

case 16:

// point class roll to the student grade book address

c[i].enrolled_students[16] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if seventeen people are enrolled in the class

case 17:

// point class roll to the student grade book address

c[i].enrolled_students[17] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if eighteen people are enrolled in the course

case 18:

// point class roll to the student grade book address

c[i].enrolled_students[18] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if nineteen people are enrolled in the course

case 19:

// point class roll to the student grade book address

c[i].enrolled_students[19] = pstudent;

// increment class counter

c[i].roll++;

cout << "\n******************************\n";

cout << "Student successfully enrolled.\n";

cout << "******************************\n";

break;

// if no more room is left in the class

default:

cout << "\n***************\n";

cout << "Course is full.\n";

cout << "***************\n";

return;

}

}

}

return;

}

void add_grades(student* s, course* c)

{

char ans;

string cname;

int snumber, cnumber, student_grading = 0;

float *pstudent1 = nullptr, *pstudent2 = nullptr, *pstudent3 = nullptr, *pstudent4 = nullptr;

cout << "\n***************************************************\n";

cout << "This option inputs grades for a student in a course.\n";

cout << "***************************************************\n\n";

cout << "What is the student's ID number? "; cin >> snumber;

// search student grade book

for (int i = 0; i < STUDENTS; i++)

{

// if student is found

if (snumber == s[i].id)

{

// get addresses and location of student and their grade books

student_grading = i;

pstudent1 = &s[i].grades1[0];

pstudent2 = &s[i].grades2[0];

pstudent3 = &s[i].grades3[0];

pstudent4 = &s[i].grades4[0];

break;

}

// if student cannot be found

else if (i == STUDENTS - 1)

{

cout << "\n******************\n";

cout << "Student not found.\n";

cout << "******************\n";

return;

}

}

cout << "What is the course name? "; cin >> cname;

cout << "What is the course number? "; cin >> cnumber;

// search courses

for (int i = 0; i < COURSES; i++)

{

// if course is found

if (cname == c[i].name && cnumber == c[i].id)

{

// search enrollments

/*

I could have written this part better. I could have checked the

enrollment counter and confined my search to only enrolled slots.

*/

for (int j = 0; j < ENROLLMENT; j++)

{

// if students first grade book is enrolled in course

if (c[i].enrolled_students[j] == pstudent1)

{

// enter grades for student in student grade book

for (int k = 0; k < MAXGRADES; k++)

{

cout << "Please enter a numerical grade: ";

cin >> s[student_grading].grades1[k];

}

}

// if students second grade book is enrolled in course

else if (c[i].enrolled_students[j] == pstudent2)

{

// enter grades for student in student grade book

for (int k = 0; k < MAXGRADES; k++)

{

cout << "Please enter a numerical grade: ";

cin >> s[student_grading].grades2[k];

}

}

// if students third grade book is enrolled in course

else if (c[i].enrolled_students[j] == pstudent3)

{

// enter grades for student in student grade book

for (int k = 0; k < MAXGRADES; k++)

{

cout << "Please enter a numerical grade: ";

cin >> s[student_grading].grades3[k];

}

}

// if students third grade book is enrolled in course

else if (c[i].enrolled_students[j] == pstudent4)

{

// enter grades for student in student grade book

for (int k = 0; k < MAXGRADES; k++)

{

cout << "Please enter a numerical grade: ";

cin >> s[student_grading].grades4[k];

}

}

// if class is full

else if (j == ENROLLMENT)

{

cout << "Student not enrolled in class.\n";

return;

}

}

}

}

return;

}

void print_grades(student* s, course* c)

{

string cname;

int cnumber, snumber, student_grading = 0;

float *pstudent1 = nullptr, *pstudent2 = nullptr, *pstudent3 = nullptr, *pstudent4 = nullptr, *student_enrollment;

cout << "\n*********************************************************************\n";

cout << "This option allows you to print all grades for a student in a course.\n";

cout << "*********************************************************************\n\n";

cout << "What is the student's id number? "; cin >> snumber;

// search for student

for (int i = 0; i < STUDENTS; i++)

{

// if student is found

if (snumber == s[i].id)

{

// get position of student in grade book and addresses to student's grade books

student_grading = i;

pstudent1 = &s[i].grades1[0];

pstudent2 = &s[i].grades2[0];

pstudent3 = &s[i].grades3[0];

pstudent4 = &s[i].grades4[0];

break;

}

// if student is not found

else if (i == STUDENTS)

{

cout << "\n******************\n";

cout << "Student not found.\n";

cout << "******************\n";

return;

}

}

cout << "What is the course name? "; cin >> cname;

cout << "What is the course number? "; cin >> cnumber;

// search for course

for (int i = 0; i < MAXCLASSES; i++)

{

// if course is found

if (cname == c[i].name && cnumber == c[i].id)

{

/*

search enrollments. this is another section I could have written better.

I could have made use of the enrollment counter each class has, and only

searched within that range.

*/

for (int j = 0; j < ENROLLMENT; j++)

{

// get address that course enrollment points to

student_enrollment = c[i].enrolled_students[j];

// if address of course enrollment and student grade book match

if (student_enrollment == pstudent1)

{

// print grades

for (int k = 0; k < MAXGRADES; k++)

cout << s[student_grading].grades1[k] << " ";

}

// if address of course enrollment and student grade book match

else if (student_enrollment == pstudent2)

{

// print grades

for (int k = 0; k < MAXGRADES; k++)

cout << s[student_grading].grades2[k] << " ";

}

// if address of course enrollment and student grade book match

else if (student_enrollment == pstudent3)

{

// print grades

for (int k = 0; k < MAXGRADES; k++)

cout << s[student_grading].grades3[k] << " ";

}

// if address of course enrollment and student grade book match

else if (student_enrollment == pstudent4)

{

// print grades

for (int k = 0; k < MAXGRADES; k++)

cout << s[student_grading].grades4[k] << " ";

}

// if student cannot be found in course enrollment

else if (j == ENROLLMENT)

{

cout << "Student not enrolled in class.\n";

return;

}

}

}

}

return;

}

void print_students_in_course(student* s, course* c)

{

string cname;

int cnumber, num_courses = 0;

float *student_enrollment;

cout << "\n*****************************************************************\n";

cout << "This option allows you to view all enrolled students in a course.\n";

cout << "*****************************************************************\n\n";

cout << "Enter a course name: ";

cin >> cname;

cout << "Enter course number: ";

cin >> cnumber;

// search for course

// a "Search Courses" function would have been really useful here

// I jumped in to writing code too quickly. I need to take more

// time planning out the modules so I can write reusable code

for (int num_courses = 0; num_courses < COURSES; num_courses++)

{

// if course is found

if (cname == c[num_courses].name && cnumber == c[num_courses].id)

{

cout << "\nStudent Name\tStudent Number\n";

cout << "------------\t--------------\n";

// search enrolled students

// again, I should have used the course enrollment counter here

for (int j = 0; j < ENROLLMENT; j++)

{

student_enrollment = c[num_courses].enrolled_students[j];

if (student_enrollment != 0)

{

// search students

for (int i = 0; i < STUDENTS; i++)

{

// if address of student grade book and course enrollment match

if (student_enrollment == &s[i].grades1[0])

{

// print out student name and id

cout << s[i].lname << ", " << s[i].fname << "\t" << s[i].id << endl;

break;

}

// if address of student grade book and course enrollment match

else if (student_enrollment == &s[i].grades2[0])

{

// print out student name and id

cout << s[i].lname << ", " << s[i].fname << "\t" << s[i].id << endl;

break;

}

// if address of student grade book and course enrollment match

else if (student_enrollment == &s[i].grades3[0])

{

// print out student name and id

cout << s[i].lname << ", " << s[i].fname << "\t" << s[i].id << endl;

break;

}

// if address of student grade book and course enrollment match

else if (student_enrollment == &s[i].grades4[0])

{

// print out student name and id

cout << s[i].lname << ", " << s[i].fname << "\t" << s[i].id << endl;

break;

}

}

}

}

break;

}

}

// class can't be found

if (num_courses == COURSES)

{

cout << "*****************\n";

cout << "Course not found.\n";

cout << "*****************\n";

}

return;

}

void student_avg(student* s, course* c)

{

string cname;

int cnumber, snumber, student_grading = 0, sum = 0;

float *pstudent1 = nullptr, *pstudent2 = nullptr, *pstudent3 = nullptr, *pstudent4 = nullptr, *student_enrollment;

cout << "\n*********************************************************************\n";

cout << "This option allows you to print the average for a student in a course.\n";

cout << "*********************************************************************\n\n";

cout << "What is the student's id number? "; cin >> snumber;

// search for student

for (int i = 0; i < STUDENTS; i++)

{

// if student is found

if (snumber == s[i].id)

{

// get location of student in grade book and addresses of student grade books

student_grading = i;

pstudent1 = &s[i].grades1[0];

pstudent2 = &s[i].grades2[0];

pstudent3 = &s[i].grades3[0];

pstudent4 = &s[i].grades4[0];

break;

}

// if student cannot be found

else if (i == STUDENTS - 1)

{

cout << "\n******************\n";

cout << "Student not found.\n";

cout << "******************\n";

return;

}

}

cout << "What is the course name? "; cin >> cname;

cout << "What is the course number? "; cin >> cnumber;

cout << s[student_grading].lname << ", " << s[student_grading].fname << " has an average of: ";

// search courses

for (int i = 0; i < MAXCLASSES; i++)

{ // if course is found

if (cname == c[i].name && cnumber == c[i].id)

{

// search enrollments in course

for (int j = 0; j < ENROLLMENT; j++)

{

// get address that enrollment points too

student_enrollment = c[i].enrolled_students[j];

// if student's first grade book address matches address that course enrollment points to

if (student_enrollment == pstudent1)

{

// add all grades in grade book and divide by total

for (int k = 0; k < MAXGRADES; k++)

sum += s[student_grading].grades1[k];

// assign to student's first grade average

s[student_grading].grades1_avg = (float)sum / MAXGRADES;

cout.setf(ios::fixed);

cout.setf(ios::showpoint);

cout.precision(2);

cout << s[student_grading].grades1_avg << endl;

cout.unsetf(ios::fixed);

cout.unsetf(ios::showpoint);

cout.precision(100);

break;

}

// if student's second grade book address matches address that course enrollment points to

else if (student_enrollment == pstudent2)

{

// add all grades in grade book and divide by total

for (int k = 0; k < MAXGRADES; k++)

sum += s[student_grading].grades2[k];

// assign to student's second grade average

s[student_grading].grades2_avg = (float)sum / MAXGRADES;

cout.setf(ios::fixed);

cout.setf(ios::showpoint);

cout.precision(2);

cout << s[student_grading].grades2_avg << endl;

cout.unsetf(ios::fixed);

cout.unsetf(ios::showpoint);

cout.precision(100);

break;

}

// if student's third grade book address matches address that course enrollment points to

else if (student_enrollment == pstudent3)

{

// add all grades in grade book and divide by total

for (int k = 0; k < MAXGRADES; k++)

sum += s[student_grading].grades3[k];

// assign to student's third grade average

s[student_grading].grades3_avg = (float)sum / MAXGRADES;

cout.setf(ios::fixed);

cout.setf(ios::showpoint);

cout.precision(2);

cout << s[student_grading].grades3_avg << endl;

cout.unsetf(ios::fixed);

cout.unsetf(ios::showpoint);

cout.precision(100);

break;

}

// if student's fourth grade book address matches address that course enrollment points to

else if (student_enrollment == pstudent4)

{

// add all grades in grade book and divide by total

for (int k = 0; k < MAXGRADES; k++)

sum += s[student_grading].grades4[k];

// assign to student's fourth grade average

s[student_grading].grades4_avg = (float)sum / MAXGRADES;

cout.setf(ios::fixed);

cout.setf(ios::showpoint);

cout.precision(2);

cout << s[student_grading].grades4_avg << endl;

cout.unsetf(ios::fixed);

cout.unsetf(ios::showpoint);

cout.precision(100);

break;

}

// if student is not enrolled in course

else if (j == ENROLLMENT)

{

cout << "\n******************************\n";

cout << "Student not enrolled in class.\n";

cout << "******************************\n";

return;

}

}

}

}

return;

}

void print_courses(student* s, course* c)

{

cout << "\n\nCourse Name\tCourse Number\n";

cout << "-----------\t-------------\n";

// print names of all courses

for (int k = 0; k < num_courses; k++)

cout << c[k].name << "\t\t" << c[k].id << endl;

}

void print_students(student* s, course* c)

{

cout << "\n\nStudent Name\tStudent Number\n";

cout << "------------\t--------------\n";

// print names of all students

for (int k = 0; k < num_students; k++)

cout << s[k].lname << ", " << s[k].fname << "\t" << s[k].id << endl;

}

void course_avg(student* s, course* c)

{

string cname;

int cnumber, sum = 0, enrollment_count = 0, student_grading;

float *pstudent1, *pstudent2, *pstudent3, *pstudent4, *student_enrollment, avg = 0, course_avg = 0;

cout << "\n*********************************************************\n";

cout << "This option allows you to print the average for a course.\n";

cout << "*********************************************************\n\n";

cout << "What is the course name? "; cin >> cname;

cout << "What is the course number? "; cin >> cnumber;

// search courses

for (int i = 0; i < MAXCLASSES; i++)

{

// if course is found

if (cname == c[i].name && cnumber == c[i].id)

{

// search through enrollments

for (int j = 0; j < ENROLLMENT; j++)

{

// get address that course enrollment points to

student_enrollment = c[i].enrolled_students[j];

// search students

for (int k = 0; k < STUDENTS; k++)

{

// get location of student and address of student grade books

student_grading = k;

pstudent1 = &s[k].grades1[0];

pstudent2 = &s[k].grades2[0];

pstudent3 = &s[k].grades3[0];

pstudent4 = &s[k].grades4[0];

// if course enrollment points to student's first grade book

if (student_enrollment == pstudent1)

{

enrollment_count++;

// add up grades

for (int m = 0; m < MAXGRADES; m++)

{

sum += s[student_grading].grades1[m];

}

// get average

avg += (float)sum / MAXGRADES;

sum = 0;

break;

}

// if course enrollment points to student's second grade book

else if (student_enrollment == pstudent2)

{

enrollment_count++;

// add up grades

for (int m = 0; m < MAXGRADES; m++)

{

sum += s[student_grading].grades2[m];

}

// get average

avg += (float)sum / MAXGRADES;

sum = 0;

break;

}

// if course enrollment points to student's third grade book

else if (student_enrollment == pstudent3)

{

enrollment_count++;

// add up grades

for (int m = 0; m < MAXGRADES; m++)

{

sum += s[student_grading].grades3[m];

}

// get average

avg += (float)sum / MAXGRADES;

sum = 0;

break;

}

// if course enrollment points to student's fourth grade book

else if (student_enrollment == pstudent4)

{

enrollment_count++;

// add up grades

for (int m = 0; m < MAXGRADES; m++)

{

sum += s[student_grading].grades4[m];

}

// get average

avg += (float)sum / MAXGRADES;

sum = 0;

break;

}

}

}

}

break;

}

// divide sumed averages by enrollment total

course_avg = (float)avg / enrollment_count;

cout.setf(ios::fixed);

cout.setf(ios::showpoint);

cout.precision(2);

cout << "The course average is: " << course_avg << endl;

cout.unsetf(ios::fixed);

cout.unsetf(ios::showpoint);

cout.precision(100);

return;

}

void save_stream(ofstream& out_file, student* s, course* c)

{

char output_file[20];

int enrollment_count = 0, num = 0;

cout << "File name: "; cin >> output_file;

// open file to save to

out_file.open(output_file);

// if opening fails

if (out_file.fail())

{

cout << "Failed to open file.\n";

exit(EXIT_FAILURE);

}

// number of courses to save

out_file << num_courses << endl;

// write course names and numbers

for (int i = 0; i < num_courses; i++)

out_file << c[i].name << " " << c[i].id << endl;

// number of students to save

out_file << num_students << endl;

// write names of students

for (int i = 0; i < num_students; i++)

{

out_file << s[i].lname << " " << s[i].fname

<< " " << s[i].id << endl;

// search all courses

// really inefficient

for (int j = 0; j < num_courses; j++)

{

// search all enrollments of course

for (int k = 0; k < ENROLLMENT; k++)

{

// if student is enrolled in course

if (c[j].enrolled_students[k] == &s[i].grades1[0])

{

enrollment_count++;

// write name of course student is enrolled in

out_file << c[j].name << " " << c[j].id << " ";

// grades for student in enrolled course

for (int m = 0; m < MAXGRADES; m++)

out_file << s[i].grades1[m] << " ";

out_file << endl;

}

// if student is enrolled in course

else if (c[j].enrolled_students[k] == &s[i].grades2[0])

{

enrollment_count++;

// write name of course student is enrolled in

out_file << c[j].name << " " << c[j].id << " ";

// grades for student in enrolled course

for (int m = 0; m < MAXGRADES; m++)

out_file << s[i].grades2[m] << " ";

out_file << endl;

}

// if student is enrolled in course

else if (c[j].enrolled_students[k] == &s[i].grades3[0])

{

enrollment_count++;

// write name of course student is enrolled in

out_file << c[j].name << " " << c[j].id << " ";

// grades for student in enrolled course

for (int m = 0; m < MAXGRADES; m++)

out_file << s[i].grades3[m] << " ";

out_file << endl;

}

// if student is enrolled in course

else if (c[j].enrolled_students[k] == &s[i].grades4[0])

{

enrollment_count++;

// write name of course student is enrolled in

out_file << c[j].name << " " << c[j].id << " ";

// grades for student in enrolled course

for (int m = 0; m < MAXGRADES; m++)

out_file << s[i].grades4[m] << " ";

out_file << endl;

}

}

}

// write zeros to file if student not enrolled in other courses

num = 4 - enrollment_count;

for (int i = 0; i < num; i++)

{

for (int j = 0; j < 12; j++)

{

out_file << 0 << " ";

}

out_file << endl;

}

enrollment_count = 0;

}

return;

}

void load_stream(ifstream& in_file, student* s, course* c)

{

float *pstudent;

string cname, temp;

char input_file[20];

int cnumber, grades[10], num = 0, student_enrollment = 0, course_enrollment = 0;

cout << "File name: "; cin >> input_file;

// open file to load

in_file.open(input_file);

// if opening failed

if (in_file.fail())

{

cout << "Failed to open file.\n";

exit(EXIT_FAILURE);

}

// get number of courses that are to be added

getline(in_file, temp);

// convert number from string to int

num = stoi(temp);

// for every course to be added

for (int i = 0; i < num; i++)

{

// get name of course

getline(in_file, temp, ' ');

c[i].name = temp;

// get course number

getline(in_file, temp);

// convert number from string to int

c[i].id = stoi(temp);

num_courses++;

}

// get number of students to be enrolled

getline(in_file, temp);

// convert number from string to int

num = stoi(temp);

// read student blocks from in_file

for (int i = 0; i < num; i++)

{

// read student lname, fname and id

getline(in_file, temp, ' ');

s[i].lname = temp;

getline(in_file, temp, ' ');

s[i].fname = temp;

getline(in_file, temp);

s[i].id = stoi(temp);

num_students++;

// read each enrolled class

for (int j = 0; j < 4; j++)

{

// check how many courses student is enrolled in

student_enrollment = s[i].class_count;

switch (student_enrollment)

{

// if not enrolled

case 0:

// get address to first student grade book

pstudent = &s[i].grades1[0];

// increment enrollment count

s[i].class_count++;

break;

// if enrolled in one course

case 1:

// get address to second student grade book

pstudent = &s[i].grades2[0];

// increment enrollment count

s[i].class_count++;

break;

// if enrolled in two courses

case 2:

// get address to first student grade book

pstudent = &s[i].grades3[0];

// increment enrollment count

s[i].class_count++;

break;

// if enrolled in three courses

case 3:

// get address to fourth student grade book

pstudent = &s[i].grades4[0];

// increment enrollment count

s[i].class_count++;

break;

}

// read each class

getline(in_file, temp, ' ');

cname = temp;

getline(in_file, temp, ' ');

cnumber = stoi(temp);

for (int n = 0; n < (MAXGRADES - 1); n++)

{

getline(in_file, temp, ' ');

grades[n] = stoi(temp);

}

getline(in_file, temp);

grades[MAXGRADES - 1] = stoi(temp);

// search for course

for (int k = 0; k <= num_courses; k++)

{

// if course is found

if (cname == c[k].name && cnumber == c[k].id)

{

// get course enrollment counter

course_enrollment = c[k].roll;

// check course enrollment counter

switch (course_enrollment)

{

// if no one is enrolled in the class

case 0:

// point class roll to the student grade book address

c[k].enrolled_students[0] = pstudent;

// increment class counter

c[k].roll++;

break;

// if one person is enrolled in the class

case 1:

// point class roll to the student grade book address

c[k].enrolled_students[1] = pstudent;

// increment class counter

c[k].roll++;

break;

// if two people are enrolled in the class

case 2:

// point class roll to the student grade book address

c[k].enrolled_students[2] = pstudent;

// increment class counter

c[k].roll++;

break;

// if three people are enrolled in the class

case 3:

// point class roll to the student grade book address

c[k].enrolled_students[3] = pstudent;

// increment class counter

c[k].roll++;

break;

// if four people are enrolled in the course

case 4:

// point class roll to the student grade book address

c[k].enrolled_students[4] = pstudent;

// increment class counter

c[k].roll++;

break;

// if five people are enrolled in the course

case 5:

// point class roll to the student grade book address

c[k].enrolled_students[5] = pstudent;

// increment class counter

c[k].roll++;

break;

// if six people are enrolled in the course

case 6:

// point class roll to the student grade book address

c[k].enrolled_students[6] = pstudent;

// increment class counter

c[k].roll++;

break;

// if seven people are enrolled in the course

case 7:

// point class roll to the student grade book address

c[k].enrolled_students[7] = pstudent;

// increment class counter

c[k].roll++;

break;

// if eight people are enrolled in the course

case 8:

// point class roll to the student grade book address

c[k].enrolled_students[8] = pstudent;

// increment class counter

c[k].roll++;

break;

// if nine people are enrolled in the course

case 9:

// point class roll to the student grade book address

c[k].enrolled_students[9] = pstudent;

// increment class counter

c[k].roll++;

break;

// if ten people are enrolled in the course

case 10:

// point class roll to the student grade book address

c[k].enrolled_students[10] = pstudent;

// increment class counter

c[k].roll++;

break;

// if eleven people are enrolled in the course

case 11:

// point class roll to the student grade book address

c[k].enrolled_students[11] = pstudent;

// increment class counter

c[k].roll++;

break;

// if twelve people are enrolled in the class

case 12:

// point class roll to the student grade book address

c[k].enrolled_students[12] = pstudent;

// increment class counter

c[k].roll++;

break;

// if thirteen people are enrolled in the class

case 13:

// point class roll to the student grade book address

c[k].enrolled_students[13] = pstudent;

// increment class counter

c[k].roll++;

break;

// point class roll to the student grade book address

case 14:

// point class roll to the student grade book address

c[k].enrolled_students[14] = pstudent;

// increment class counter

c[k].roll++;

break;

// if fifteen people are enrolled in the class

case 15:

// point class roll to the student grade book address

c[k].enrolled_students[15] = pstudent;

// increment class counter

c[k].roll++;

break;

// if sixteen people are enrolled in the class

case 16:

// point class roll to the student grade book address

c[k].enrolled_students[16] = pstudent;

// increment class counter

c[k].roll++;

break;

// if seventeen people are enrolled in the class

case 17:

// point class roll to the student grade book address

c[k].enrolled_students[17] = pstudent;

// increment class counter

c[k].roll++;

break;

// if eighteen people are enrolled in the course

case 18:

// point class roll to the student grade book address

c[k].enrolled_students[18] = pstudent;

// increment class counter

c[k].roll++;

break;

// if nineteen people are enrolled in the course

case 19:

// point class roll to the student grade book address

c[k].enrolled_students[19] = pstudent;

// increment class counter

c[k].roll++;

break;

}

// if enrollment address matches student's first grade book

if (pstudent == &s[i].grades1[0])

{

for (int n = 0; n < (MAXGRADES - 1); n++)

s[i].grades1[n] = grades[n];

s[i].grades1[MAXGRADES - 1] = grades[MAXGRADES - 1];

}

// if enrollment address matches student's second grade book

else if (pstudent == &s[i].grades2[0])

{

for (int n = 0; n < (MAXGRADES - 1); n++)

s[i].grades2[n] = grades[n];

s[i].grades2[MAXGRADES - 1] = grades[MAXGRADES - 1];

}

// if enrollment address matches student's third grade book

else if (pstudent == &s[i].grades3[0])

{

for (int n = 0; n < (MAXGRADES - 1); n++)

s[i].grades3[n] = grades[n];

s[i].grades3[MAXGRADES - 1] = grades[MAXGRADES - 1];

}

// if enrollment address matches student's fourth grade book

else if (pstudent == &s[i].grades4[0])

{

for (int n = 0; n < (MAXGRADES - 1); n++)

s[i].grades4[n] = grades[n];

s[i].grades4[MAXGRADES - 1] = grades[MAXGRADES - 1];

}

}

}

}

}

return;

}

main.cpp:

//main.cpp

#include "stdafx.h"

#include "header.h"

using namespace std;

int main()

{

course course_catalog[25];

student student_body[100];

int user_input = 0;

ifstream in_file;

ofstream out_file;

while (user_input != 13)

{

cout << "\n\n****************************************\n";

cout << "\tGrade Book Options\n";

cout << "****************************************\n";

cout << "\n\t1. Add a course\n";

cout << "\t2. Add a student\n";

cout << "\t3. Add a student to a course\n";

cout << "\t4. Add grades for a student in a course\n";

cout << "\t5. Print a list of all grades for a student in a course\n";

cout << "\t6. Print a list of all students in a course\n";

cout << "\t7. Compute the average for a student in a course\n";

cout << "\t8. Print a list of all courses\n";

cout << "\t9. Print a list of all students\n";

cout << "\t10. Compute the average for a course\n";

cout << "\t11. Store Grade Book (to a disk file)\n";

cout << "\t12. Load Grade book (from a disk file)\n";

cout << "\t13. Exit\n\n\n";

cout << "What would you like to do? ";

cin >> user_input;

switch (user_input)

{

case 1: add_course(student_body, course_catalog);

break;

case 2: add_student(student_body, course_catalog);

break;

case 3: student_to_course(student_body, course_catalog);

break;

case 4: add_grades(student_body, course_catalog);

break;

case 5: print_grades(student_body, course_catalog);

break;

case 6: print_students_in_course(student_body, course_catalog);

break;

case 7: student_avg(student_body, course_catalog);

break;

case 8: print_courses(student_bod

Add a comment
Know the answer?
Add Answer to:
For this assignment we are going to create the beginnings of a simple Grade Book. We...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Design and code a JAVA program called ‘Grades’. ? Your system should store student’s name, and...

    Design and code a JAVA program called ‘Grades’. ? Your system should store student’s name, and his/her course names with grades. ? Your system should allow the user to input, update, delete, list and search students’ grades. ? Each student has a name (assuming no students share the same name) and some course/grade pairs. If an existing name detected, user can choose to quit or to add new courses to that student. ? Each student has 1 to 5 courses,...

  • Your assignment is to write a grade book for a teacher. The teacher has a text file, which includ...

    Your assignment is to write a grade book for a teacher. The teacher has a text file, which includes student's names, and students test grades. There are four test scores for each student. Here is an example of such a file: Count: 5 Sally 78.0 84.0 79.0 86.0 Rachel 68.0 76.0 87.0 76.0 Melba 87.0 78.0 98.0 88.0 Grace 76.0 67.0 89.0 0.0 Lisa 68.0 76.0 65.0 87.0 The first line of the file will indicate the number of students...

  • Java This application will be menu driven. The application should allow: 1. Collect student information and...

    Java This application will be menu driven. The application should allow: 1. Collect student information and store it in a binary data file. Each student is identified by an unique ID.   The user should be able to view/edit an existing student. Do not allow the user to edit student ID. 2. Collect Course information and store it in a separate data file. Each course is identified by an unique ID. The user should be able to view/edit an existing course...

  • The application should be in JAVA and allow: 1. Collect student information and store it in...

    The application should be in JAVA and allow: 1. Collect student information and store it in a binary data file. Each student is identified by an unique ID. The user should be able to view/edit an existing student. Do not allow the user to edit student ID. 2. Collect Course information and store it in a separate data file. Each course is identified by an unique ID. The user should be able to view/edit an existing course information. User is...

  • In JAVA please! Write program for exercises You will write a Graphical User Interface(GUI) application to manage student...

    In JAVA please! Write program for exercises You will write a Graphical User Interface(GUI) application to manage student information system. The application should allow: 1. Collect student information and store it in a binary data file. Each student is identified by an unique ID. The user should be able to view/edit an existing student. Do not allow student to edit ID. 2. Collect Course information and store it in a separate data file. Each course is identified by an unique...

  • PYTHON 3 Object Oriented Programming ***a9q3.py file below*** class GradeItem(object): # A Grade Item is anything...

    PYTHON 3 Object Oriented Programming ***a9q3.py file below*** class GradeItem(object): # A Grade Item is anything a course uses in a grading scheme, # like a test or an assignment. It has a score, which is assessed by # an instructor, and a maximum value, set by the instructor, and a weight, # which defines how much the item counts towards a final grade. def __init__(self, weight, scored=None, out_of=None): """ Purpose: Initialize the GradeItem object. Preconditions: :param weight: the weight...

  • Please draw a class diagram for the following classes and relationships We have classes: Instructor, Student,...

    Please draw a class diagram for the following classes and relationships We have classes: Instructor, Student, Main Menu, create account, login, create the student's passwords, create a course, view my courses, create an assignment, view my grades, create a new password And they have the following relations: 1. Instructor and Student can create an account 2. Instructor and student can login 3. Instructor must create the students' password Instructor can create a course, assignment, Instructor can view courses and grades...

  • In C++ Write a menu driven C++ program to read a file containing information for a list of Students, process the data, t...

    In C++ Write a menu driven C++ program to read a file containing information for a list of Students, process the data, then present a menu to the user, and at the end print a final report shown below. You may(should) use the structures you developed for the previous assignment to make it easier to complete this assignment, but it is not required. Required Menu Operations are: Read Students’ data from a file to update the list (refer to sample...

  • Java program Program: Grade Stats In this program you will create a utility to calculate and...

    Java program Program: Grade Stats In this program you will create a utility to calculate and display various statistics about the grades of a class. In particular, you will read a CSV file (comma separated value) that stores the grades for a class, and then print out various statistics, either for the whole class, individual assignments, or individual students Things you will learn Robustly parsing simple text files Defining your own objects and using them in a program Handling multiple...

  • In this assignment you are asked to write a python program to maintain the Student enrollment...

    In this assignment you are asked to write a python program to maintain the Student enrollment in to a class and points scored by him in a class. You need to do it by using a List of Tuples What you need to do? 1. You need to repeatedly display this menu to the user 1. Enroll into Class 2. Drop from Class 3. Calculate average of grades for a course 4. View all Students 5. Exit 2. Ask the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT