Write a class called student that will keep track of student

Assignment Help Basic Computer Science
Reference no: EM13322358

Write a class called Student that will keep track of a student and a grade.

The class should have a constructor that takes a first name, last name and a grade (double)
The class should have a getFirstName, getLastName and getGrade methods
The class should have a getName that returns the first name, a space and the last name
The actual firstName, lastName and grade fields should be private:
Here is the main:
void main(){

Student s("Rob", "Hampton", 85.5);
cout << s.getName() << endl; // should output "Rob Hampton"
Student x("Tom", "Smith", 90);
cout << x.getLastName() << ", " << x.getFirstName() << " " << x.getGrade() << endl;
// should output "Smith, Tom 90"
}

 

Reference no: EM13322358

Questions Cloud

Explain the concentration of the hydroxide ion : In a solution of NH3, the concentration of NH3 is 0.01 M, Kb is 1.8 x 10-5. What is the concentration of the hydroxide ion
How many restore commands would you have to give to recover : In the worst case scenario, how many restore commands would you have to give to recover a file that was dumped using this schedule?
How many units did integrated corporation sell : How many units did Integrated Corporation sell?
Explain the result of the solubility of the unknown in hcl : If an unknown is water soluble, why is it unnecessary and potentially misleading to perform (and interpret) the result of the solubility of this unknown in 5% HCl.
Write a class called student that will keep track of student : Write a class called Student that will keep track of a student and a grade.
How does this finding affect the rest of your audit : 1. Assume that you are an auditor and as part of your routine audit, you discover a fraud being committed by the accounts receivable manager. The fraud is large enough to have a material impact on the financial statements. How does this findin..
Explain how do the requirements that t and v are constant : How do the requirements that t and v are constant enter the derivation for delta Asys
Replaces the xxxxs in code below to complete the functions : Replaces the "XXXXs" in the code below to complete the two functions.
The sales budget for perrier : The sales budget for Perrier

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Show even-parity encoding of bit string in form of bytes

Show the even-parity encoding of the following bit string, in the form of bytes: 0100101011101011101010110110 (break it up into pieces of data large enough to encode as several parity-encoded bytes.

  Create a fraction struct that has a numerator

Create a fraction struct that has a numerator and a denominator. Make an overloaded operator + for the struct that can add two fractions and return a fraction result. Make a overloaded

  Write a java application that inputs three integers

Write a Java application that inputs three integers from the user and displays the sum, average, product, smallest and largest of the numbers. Use a Scanner object to get the input from the user.

  What is the difference between intrinsic and acquired value

What is the difference between intrinsic value and acquired value?

  Input function to prompt the user to enter a square

In the script file, use the input function to prompt the user to enter a square 2-dimensional array. Use a loop to check that user's input is a square array and repeatedly ask the user to enter a square array until they enter a square array (you m..

  Explain-analyze algorithm to determine cyclic rotation

Explain and analyze the algorithm which determines whether one string P[1 ..m] is cyclic rotation of another string T[1 .. n].

  This thesis artefact is flexible

This thesis artefact is flexible in a sense that helper can use any other sort of tools to accomplish the task as long as it matches with the aim but please, let me know how he/ she going to do it.

  Java program to input values into array

Write a Java program to input the following values into an array named prices: 10.95, 16.32, 12.15, 8.22, 15.98, 26.22, 13.54, 6.45, 17.59.

  Can rtp be designed to eliminate the sequence number field

The RTP incorporates a sequence number filed in addition to the timestamp field. Can RTP be designed to eliminate the sequence number field and use the timestamp field to resequence the out-of-order received packets? Justify your answer.

  What is the output of the following loop

What is the output of the following loop? System.out.println("+----+"); for (int i = 1; i

  Tools used to avoid losing passphrase

Are there any tools which someone can utilize safely, other than key recovery, to avoid losing his or her passphrase?

  Impact of activities called ping sweeps and port scans

Your boss has just heard about some nefarious computer activities called ping sweeps and port scans. He wants to know more about them and what the impact of these activities might be on your company.

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