예제 #1
3
// function main begins program execution
int main()
{
   string nameOfCourse; // string of characters to store the course name
   GradeBook myGradeBook; // create a GradeBook object named myGradeBook
   
   // display initial value of courseName
   cout << "Initial course name is: " << myGradeBook.getCourseName() 
      << endl;

   // prompt for, input and set course name
   cout << "\nPlease enter the course name:" << endl;
   getline( cin, nameOfCourse ); // read a course name with blanks
   myGradeBook.setCourseName( nameOfCourse ); // set the course name

   cout << endl; // outputs a blank line
   myGradeBook.displayMessage(); // display message with new course name
   return 0; // indicate successful termination
} // end main
예제 #2
1
int main()
{
    string nameOfCourse;
    GradeBook myGradeBook;

    cout << "Initial course name is: "
         << myGradeBook.getCoursename() << endl;

    cout << "Please enter the course name:" << endl;
    getline(cin, nameOfCourse);
    myGradeBook.setCourseName(nameOfCourse);

    cout << endl;
    myGradeBook.displayMessage(nameOfCourse);
    return 0;
}
예제 #3
0
int main()
{
    GradeBook myGradeBook;
    myGradeBook.displayMessage();
    system("pause");
    return 0;
}
예제 #4
0
//Execution Begins Here
int main(int argc, char** argv) 
{
    
    GradeBook myGradeBook; //create a GradeBook object
    myGradeBook.displayMessage(); 

    //Exit stage right
    return 0;
}
예제 #5
0
int main(int argc, char **argv)
{
  int operationCount, count;
  short scores[600];
  const Operation *operations;
  operations = readFile(argv[1], &operationCount);
  CPUTimer ct;
  ct.reset();
  GradeBook *gradeBook = new GradeBook();

  if(argv[2][0] != '0')
    runTests(gradeBook, operations, operationCount);
  else
  {
    for(int i = 0; i < operationCount; i++)
    {
      switch(operations[i].type)
      {
        case LIST_STUDENT :
          gradeBook->listStudent(operations[i].CRN, operations[i].SID, &count,
            scores);
          break;
        case ADD_STUDENT :
          gradeBook->addStudent(operations[i].CRN, operations[i].SID);
          break;
        case REMOVE_STUDENT :
          gradeBook->removeStudent(operations[i].CRN, operations[i].SID);
          break;
        case UPDATE:
          gradeBook->update(operations[i].CRN, operations[i].title, operations[i].SID,
            operations[i].score);
          break;
        case LIST_ASSIGNMENT :
          gradeBook->listAssignment(operations[i].CRN, operations[i].title,
            &count, scores);
          break;
        case ENTER_SCORES :
          gradeBook->enterScores(operations[i].CRN, operations[i].title,
            operations[i].scores);
          break;
        case ADD_ASSIGNMENT :
          gradeBook->addAssignment(operations[i].CRN, operations[i].title,
            operations[i].maxScore);
          break;
        case ADD_COURSE :
          gradeBook->addCourse(operations[i].CRN);
          for (int j = 0; j < operations[i].count ; j++ )
          	gradeBook->addStudent(operations[i].CRN, operations[i].SIDs[j]);
          break;
      } // switch
    } // for i
  } // else no tests

  cout << "CPU Time: " << ct.cur_CPUTime() << endl;
  return 0;
} // main()
int main()
{
	string nameOfCourse;
	GradeBook mygradebook;
	cout << "Please enter the course name" << endl;
	getline(cin, nameOfCourse);//read a input with blanks
	cout << endl;
	mygradebook.displaymessage(nameOfCourse);
	return 0;
}
예제 #7
0
int main()
{
    string nameOfCourse;
    GradeBook myGradeBook;

    cout << "Please enter the course name:" << endl;
    getline(cin, nameOfCourse);
    cout << endl;

    myGradeBook.displayMessage(nameOfCourse);
    return 0;
}
예제 #8
0
// function main begins program execution
int main()
{
   string nameOfCourse; // string of characters to store the course name
   GradeBook myGradeBook; // create a GradeBook object named myGradeBook
   
   // prompt for and input course name
   cout << "Please enter the course name:" << endl;
   getline( cin, nameOfCourse ); // read a course name with blanks
   cout << endl; // output a blank line

   // call myGradeBook's displayMessage function
   // and pass nameOfCourse as an argument
   myGradeBook.displayMessage( nameOfCourse );
} // end main
예제 #9
0
int main() //a função main inicia a execução do programa
{
	GradeBook myGradeBook; //cria um objeto GradeBook chamado myGradeBook
	myGradeBook.displayMessage(); //chama a função displayMessage do objeto
	return 0; 
}
int main()
{
	GradeBook mygradebook;
	mygradebook.displayMessage();
	return 0;
}