Design, write, and test a program

Assignment Help C/C++ Programming
Reference no: EM13164478

Design, write, and test a program that represents some of the aspects of a student. As you read the problem description, sketch a UML diagram of the Student class in the handy UML form below. The box will fit the text you type. Refer to page 654 of the Malik book to remind yourself of the UML format.

 

Type your UML class description here

 

 

 

 

Your dotNet project should contain three files:

Student.h - The Student class header file

Student.cpp - The Student class implementation file

StudentTest.cpp - A file containing a main( ) to test your Student class.

 

First you need to describe a Student class which contains the following:

 

1.     the private data members include:

a.      the student name - a string

b.     the student id - a number

c.      the number of courses completed

d.     the number of credit hours completed

e.      the number of grade points attained

2.     the public member functions include:

a.      the default constructor - set everything to 0 or the empty string

b.     an explicit value constructor - takes student name and student id parameters

c.      a method reportGrade - takes the number of credit hours for a completed course and the grade (A,B,C,D,F).

d.     a getGPA method - returns the student's current grade point average

e.      a display method - outputs all the student data, one item per line including the current GPA.

 

The reportGrade method takes parameters for the number of credit hours for a course and the letter grade for a course. It does not return any result. This method increments the number of courses completed, adds the number of credit hours for this course to the number of credit hours completed. It calculates the number of grade points earned for the course by multiplying the credit hours for the course by 4 if the course grade is an A, 3 for B, 2 for C, 1 for D, and 0 for F.

The calculated amount of grade points is then added to the grade points attained.

 

The getGPA method takes no parameters and returns the calculated GPA which is the grade points attained divided by the number of credit hours completed. This should be a double value.

 

The main program should thoroughly test the student class. Make sure to test both the default and the explicit value constructors. Create two student objects. Display the student information. Report a series of grades on each object and output the GPA after each reported grade. Make sure the GPA is correct. Display the GPA with 2 digits after the decimal point. Finally, display all student information after the grade reporting is completed. The test program does NOT need to be interactive.

 

 

Reference no: EM13164478

Questions Cloud

Should fuelsource recognize a provision : Should FuelSource recognize a provision as of December 31, 20X1, (1) in reporting to itsU.K. parent under IFRSs and (2) in reporting to its U.S.-based lender in accordance withU.S. GAAP?
State what is the reaction order with respect to no : Plot NO2 versus time, ln NO2 vs time, and 1/NO2 vs time. Which graph yields the best straight line? what is the reaction order with respect to NO2? Briefly explain
How many molecules of ethanol are present : How many molecules of ethanol are present in 125mL of ethanol? The density of ethanol is 0.789g/cm^3.
State the normal boiling point of ethanol : The normal boiling point of ethanol (C2H5OH) is 78.3 °C and its molar enthalpy of vaporization is 38.56 kJ/mol. What is the change in entropy in the system in J/K when 62.2 grams of ethanol
Design, write, and test a program : Design, write, and test a program that represents some of the aspects of a student
Programmer does not have to use the def statement : Unlike Z+-, the programmer does not have to use the DEF statement to create a variable. Instead, the programmer can simply use the variable. The first use of the variable creates it and initializes it to 0.
State the complete eigen-function of the molecule : Before the collision what is the complete Eigen-function of the molecule? assuming the surface is located at x=0, and V (x =0)=0 and tha tthe molecule is located at a position X>>0. which means the molecule can be treated as a free mass in the re..
Implement a class to represent a matrix : Implement a class to represent a matrix. While doing this exercise, you are allowed only to use C++ primitive types and arrays. You may not use STL in your Matrix definition. You must use dynamic memory.
A lock variable not a good solution for mutual exclusion : why is busy waiting on a lock variable not a good solution for mutual exclusion?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a program that asks the user to enter two numbers.

Starting Out with C++ Write a program that asks the user to enter two numbers.

  Computer programming using c language lab

Computer programming using c language lab

  Repeat these questions by writing functions

Repeat these questions by writing functions that receive the arrays as constant reference parameters and return the appropriate values through the function name (via return statement). The function header could look like:

  Draws a pyramid consisting of bricks

Write a C program that draws a pyramid consisting of bricks arranged in horizontal rows, so that the number of bricks in each row decreases by one as you move up the pyramid.

  A password must have at least eight characters

A password must have at least eight characters. A password must consist of only letters and digits. A password should contain at least one uppercase letter. A password must contain at least two digits.

  Write a c program that reads a data file of floating numbers

Write a program that reads a data file of floating numbers into an array and prints the array elements along with the number of items in the array

  Create a structure that has one variable called value

"Create a structure that has one variable called value and one pointer to the list (making it a linked list). Prompt for 5 values from the keyboard as input and store them in the linked list. Print out the current contents of the list.

  Prepare a program that uses the pthread library

Prepare a C/C++ program that uses the PTHREAD library to create threads and mutexes to synchronize them.

  Calculates different formulas that converge to the number pi

Write a C program (Care should be taken not to use extensions of C + + language in your work ) that calculates different formulas that converge to the number  pi,  to compare the speed of convergence of these formulas. Each form will be calculated by..

  Write a for loop that adds the integers

Assume the int variables i , lo , hi , and result have been declared and that lo and hi have been initialized. Write a for loop that adds the integers between lo and hi (inclusive), and stores the result in result .

  Insert the missing code in the c program

You are to insert the missing code in the C program given for combinational equivalence checking. This program will interface with the CUDD package and will parse netlist files in ISCAS85 circuit format. Next, BDDs will be created for each circuit an..

  Create huffman codes

Write a C++ program to create Huffman codes. Program input is a file called freq.txt (make up your own file for testing) that contains data on the characters in some cleartext file in the form of each character's non-zero frequency of occurrence i..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd