Question

please help asap in c++, you dont have to do everything but at least give me...

please help asap

in c++, you dont have to do everything but at least give me a starting idea of how this should look like

Write a class Assignment that has private attributes for Name, Possible Points and Earned Points

Write a class Student that has private attributes for name and a vector of assignments. The constructor method should require a name. Add a method for get total score that returns the total number of points earned divided by the total number of possible points for their assignments.

Write a class Gradebook that has a vector of students and methods for print highest scoring student, that prints the student with the highest score, print lowest scoring student, print class average, add student ( accept a student reference to add ), score student ( that asks for a student name and prompts for scores for their assignments ), add assignment ( that adds an assignment with a 0 score for all students if there already isn't an assignment with that name ), print student list summary ( print the list of students and total score), print student detail ( print the list of students and every assignment score ).

Allow the user to Save ( write a file ) or Load ( read a file ) a gradebook.

Add a main method that has a looping menu allowing them to Add Students to the Gradebook, Add Assignments to the Gradebook, and all the other Gradebook functions.

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

Note : I developed most of the thing...could u try to develop main class..

__________________________

#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <vector>
using namespace std;

class Assignment
{
private :
   string name;
   int possiblePoints;
   int earnedPOints;
   public :  
   Assignment(string name,int possible,int earned)
   {
      this->name=name;
      this->possiblePoints=possible;
      this->earnedPOints=earned;
   }
   string getName()
   {
      return name;
   }
   int getPossiblePoints()
   {
      return possiblePoints;
   }
   int getEarnedPOints()
   {
      return earnedPOints;
   }
   void setName(string name)
   {
      this->name=name;
   }
   void setPossiblePoints(int possible)
   {
      this->possiblePoints=possible;
   }
   void setEarnedPOints(int earned)
   {
      this->earnedPOints=earned;
   }

};

class Student
{
private :
   string name;
   vector<Assignment> vec;
public :  
Student(string name)
{
    this->name=name;
}
double getTotalScore()
{
    int totPossible=0,totEarned=0;
    for(int i=0;i<vec.size();i++)
    {
    totPossible+=vec[i].getPossiblePoints();
    totEarned+=vec[i].getEarnedPOints();
   
   }
   return ((double)totEarned/totPossible)*100;
   
}

string getName()
{
    return name;
}

vector<Assignment> getStudentAssignments()
{
   return vec;
}
  
int getSize()
{
   return vec.size();
}

};

class GradeBook
{
private :
   vector<Student> students;
public :  
GradeBook()
{
  
}
void displayHighestScoreStudent()
{
   double max=students[0].getTotalScore();
   int indx=0;
   string name;
   for(int i=0;i,students.size();i++)
   {
       if(max<students[1].getTotalScore())
       {
           max=students[i].getTotalScore();
           indx=i;
       }
   }
   cout<<students[indx].getName()<<" got the highest score "<<max<<endl;
}
void displayLowestScoreStudent()
{
   double min=students[0].getTotalScore();
   int indx=0;
   string name;
   for(int i=0;i,students.size();i++)
   {
       if(min>students[1].getTotalScore())
       {
           min=students[i].getTotalScore();
           indx=i;
       }
   }
   cout<<students[indx].getName()<<" got the lowest score "<<min<<endl;
}
void displayClassAverage()
{
   double tot=0;
   for(int i=0;i<students.size();i++)
   {
       tot+=students[i].getTotalScore();
   }
   cout<<"Class Average :"<<tot/students.size()<<endl;
}
  
void addStudent(Student std)
{
   students.push_back(std);
}
void printStudentList()
{
   cout<<"\nDisplaying the Student List#"<<endl;
   cout<<setw(25)<<left<<"Name"<<setw(8)<<right<<"Score"<<endl;
   for(int i=0;i<students.size();i++)
   {
       cout<<setw(25)<<left<<students[i].getName()<<setw(8)<<right<<students[i].getTotalScore()<<endl;
   }
}

void printStudentDetail()
{
    for(int i=0;i<students.size();i++)
    {
       cout<<students[i].getName()<<endl;
       for(int j=0;j<students[i].getSize();i++)
       {
           vector<Assignment> vec1=students[i].getStudentAssignments();
          
           cout<<vec1[i].getPossiblePoints()<<"\t"<<vec1[i].getEarnedPOints()<<endl;
           }
       }
   }
  

  
};
int main() {
  
   return 0;
}

__________________________Thank You

Add a comment
Know the answer?
Add Answer to:
please help asap in c++, you dont have to do everything but at least give me...
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
  • python 3 question Project Description Electronic gradebooks are used by instructors to store grades on individual assignments and to calculate students’ overall grades. Perhaps your instructor uses gr...

    python 3 question Project Description Electronic gradebooks are used by instructors to store grades on individual assignments and to calculate students’ overall grades. Perhaps your instructor uses gradebook software to keep track of your grades. Some instructors like to calculate grades based on what is sometimes called a “total points” system. This is the simplest way to calculate grades. A student’s grade is the sum of the points earned on all assignments divided by the sum of the points available...

  • Write a program that performs the following: 1. Presents the user a menu where they choose...

    Write a program that performs the following: 1. Presents the user a menu where they choose between:              a. Add a new student to the class                           i. Prompts for first name, last name                           ii. If assignments already exist, ask user for new student’s scores to assignments              b. Assign grades for a new assignment                           i. If students already exist, prompt user with student name, ask them for score                           ii. Students created after assignment will need to...

  • Please help ASAP! C ++, linked list, etc. everything for the project is in the link...

    Please help ASAP! C ++, linked list, etc. everything for the project is in the link below. https://www.zipshare.com/download/eyJhcmNoaXZlSWQiOiIzZDIyN2UzYi1kNGFhLTRlMzEtYjMzZi00MDhmYzNiMjk3ZGMiLCJlbWFpbCI6Im1pMTQzNEBnbWFpbC5jb20ifQ== You should turn it in by blackboard. Each task should be in a separate unzipped folder named YourLastName_YourFirstInitial_taskN, where N is the task number inside a zipped file named: YourLastName_YourFirstInitial.zip. You may use code you have written previously and you may ask other members of the class questions about the assignment. However, you must do your own assignment; you may not use...

  • In Java(using BlueJ) Purpose Purpose is to practice using file input and output, and array list of objects. Also, this lab specification tells you only what to do, you now have more responsibility to...

    In Java(using BlueJ) Purpose Purpose is to practice using file input and output, and array list of objects. Also, this lab specification tells you only what to do, you now have more responsibility to design how to do it. Problem description You are given a text file called 'Students.txt' that contains information on many students. Your program reads the file, creating many Student objects, all of which will be stored into an array list of Student objects, in the Students...

  • 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...

  • Assignment W3-2 This programming assignment addresses: •Compiling and Executing an App with more than 1 class...

    Assignment W3-2 This programming assignment addresses: •Compiling and Executing an App with more than 1 class •Initializing Objects using Constructors •Software Engineering with Private Instances Variables and Public Set/Get Methods •Uses Methods inside classes Description: You are asked to write a program to process two students’ scores. Each student will have scores for 3 tests, the user will input each student’s full name followed by their three scores. When the data for the two students are read from the keyboard,...

  • Write a class AdjustedAssignment that has private attributes for Name and a vector of integers Scores....

    Write a class AdjustedAssignment that has private attributes for Name and a vector of integers Scores. Add public set and get methods for Name Write a public method addScore that accepts an integer and add it's to the score vector write public methods for maximum, minimum and average - but before calculating, find the difference between the highest score and 100, and when calculating max, min and average, add that value to the result ( don't actually change the values...

  • please use the c language Assignment 12 The program to write in this assignment is a...

    please use the c language Assignment 12 The program to write in this assignment is a program that calculates score statistics and manages the grades of the students. First, the student list and are given in a file named "student.dat" as in the following: 이성우 77 홍길동 88 scores 201 1710086 2012700091 This program reads the input file "student.dat" and keeps this data in a linear linked list. Each node must be a struct which contains the following: student id...

  • what is the solution for this Java problem? Generics Suppose you need to process the following...

    what is the solution for this Java problem? Generics Suppose you need to process the following information regarding Students and Courses: A Student has a name, age, ID, and courseList. The class should have a constructor with inputs for setting name, ID and age. The class should have setters and getters for attributes name, ID and age, and a method addCourse, removeCourse, printSchedule. courseList: use the generic class ArrayList<E> as the type of this attribute addCourse: this method takes as...

  • This is a C++ Program, I need the program broken up into Student.h, Student.cpp, GradeBook.h, GradeBook.cpp,...

    This is a C++ Program, I need the program broken up into Student.h, Student.cpp, GradeBook.h, GradeBook.cpp, and Main.cpp 1. The system must be able to manage multiple students (max of 5) and their grades for assignments from three different assignment groups: homework (total of 5), quizzes (total (total of 2) of 4), and exams 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...

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