Object Oriented Programming with C++ CISP400

Added on - 09 Oct 2019

  • CISP400


  • 10


  • 3182


  • 199


  • 0


Trusted by +2 million users,
1000+ happy students everyday
Showing pages 1 to 3 of 10 pages
You can choose to submit either A3 (worth 150 points), AD3 (worth 180), orboth (worth 180) for 3rd assignment you will get a score for this assignmenteither 150 points base or 180 points base.Grading Criteria:1.If the submitted program cannot be compiled or run on a Microsoftvisual studio 2013 C++ compiler, the assignment will not get anycredit.2.If the file name does not follow the naming instruction as stated insyllabus, the assignment will get 5 to 15 points deduction.3.If the header section of the submitted file does not include personalinformation and purpose of the file, the assignment will get 5 to 30points deduction.4.Late assignments will not get any credit for the assignment.5.A submission does not follow the instructions of the assignment willget little credit.6.A portion of the assignment is not finished or incomplete will get littleor no credit.7.Submit an assignment to a wrong drop box. The wrong drop box onewill not get any credit.8.If use A for AD or AD for A assignments in the file name, the studentwill not get any credit for the assignments.9.If the submitted file(s) cannot be opened by the instructor’s software(WinZip, Visual Studio, or text editor) the assignment will have littlecredit.10.If the submission file does not include all necessary programmingfiles to run the program, the program will get little credit.11.If the program does not separate into several files (driver, headerfile, implementation file, etc.) as describe in the assignment, theprogram will get little credit.12.If the displaying result of the program is not exactly match withthe graphic in the assignment description or the displaying result ofPage1of10CISP400V9A3
the executable file which comes with the assignment, the assignmentwill get little credit.13.If the program does not have enough detail documentation inthe programming area the program will get 5 to 30 points deduction.14.If the program includes some unrelated documentation theprogram will get some points deduction.A3Create a GradeBook class that calculates a grade-point average for a set of grades and displaysinformation. You can input A, a, B, b, C, c, D, d, F and f for grades. But the inputted data could alsobe any characters, upper case, lower case or special character. The system should detect an impropergrade input and allow reentering information. The grade of A is worth 4 points, B is worth 3 points,etc. You can use GradeBook program of Fig. 5.9–Fig. 5.11(attached) as a starting point.The GradeBook class has the following methods and attributes.1.TheGradeBookclass has 3 private data members, courseName, letterGrades and countGrades.a.The courseName has a string data type. It stores course name information.b.The letterGrades is a 100 elements character array. It stores all the inputs informationwhich include the letter grades and non-letter grade information. For example, if you put a,$, a, C, 1, ! for the first 6 inputs the letterGrades first six elements should store A, $, A, C,1, !.c.The countGrades is a 6 elements integer array. It stores the number of each letter grade andnumber of the error(s) input. For example, if you input 5 As, 6 Bs, 1 C, 2 Ds, 2 Es and 3Fs, the countGrades array elements from 0 to 5 should contain 5, 6, 1, 2, 3 and 2.2.It also has several public member functions, GradeBook, setCourseName, getCourseName,initializeData, displayMessage, inputGrades, displayGradeReport, displayInputs,calculateGrade and ~GradeBook.a.TheGradeBook function is aconstructor. It takes a string and will initialize its datamembers’ data. The constructor also displays information which includes “The GradeBook Constructor is called", “*****The end of Grade Book Constructor.*****” and theinformation in between these two statements.b.ThesetCourseNamefunction takes a string and does not return anything. This function setsinformation for the string private data,courseName. It takes only the first 30 characters ofthe input string. If the inputted string shorter than 30 it will take everything. If it is longerthan 30 it will keep the first 30 characters and truncate the rest of the information.Page2of10CISP400V9A3
c.ThegetCourseNamefunction returns the private data,courseName, information. It doesnotaccept any data.d.TheinitializeDatafunction does not take and return anything. It initializes the private datamembers.e.ThedisplayMessagefunction does not take and return anything. It displays "Welcome tothe grade book for " information.f.TheinputGradesfunction does not take and return anything. It generates loops to get anynumber(but it need to be less than 100) of proper data input. If the inputted data is not anyone of the following A, a, B, b, C, c, E, d, F, and f, the program will show “****Incorrectletter grade entered.****” message. The loop will be ended by inputting Ctl + D, or Ctl + Z( it depends on your computer system).g.ThedisplayGradeReportfunction does not accept and return any data. It displays “Thetotal number of students receive grades is ", "Number of students who received each lettergrade” and “The class average is’ information. The class average is displayed in one digitdouble value.h.The displayInputs function does not accept and return any data. It displays “The dataentered is listed at the following: " as a heading and all the grades (information) entered in a4 in a row tabulate format.i.ThecalculateGrade function does not accept any data but return a double value. Thisfunction calculates the GPA (Grade Point Average) and return the data.j.i.The ~GradeBook function is the destructor of the class. When it called it will clean upthe memory and displays “Destructor is called” message.This assignment comes with a CISP400V9A3.zip file. It includes four files (CISP400V9A3.cpp,CISP400V9A3.exe,GradeBook.cpp and GradeBook.h). The CISP400V9A3.exe file is an executablefile. You can double click the file to get to the expecting result (see the picture below) of thisassignment. TheGradeBook.cpp and GradeBook.hare files coming from the textbook examples (Fig5.9 and 5.10) which you can use so you don’t need to start from scratch. After you finish yourimplementation for theGradeBookclass, you can put the CISP400V9A3.cpp,GradeBookhGradeBook.cpp in a project and then you should run to the same result as the CISP400V9A3.exe.Please be awarded that you can adjust only your program (GradeBookh andGradeBook.cpp) to generate therequired result but not the code in CISP400V9A3.cpp file.The following are the displays of the expecting results.The beginning screen of theprogram.Page3of10CISP400V9A3
You’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document