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

  What client-server technology

What client-server technology was used to create the webpage.

  Why would you use the const keyword

What is the const keyword in C++? Why would you use the const keyword?

  Describe the considerations

Describe the considerations that organizations and investigators must take into account when determining the appropriate tools to use, while knowing that the tool will be used to support legal proceedings.

  Determine size of one minute mono audio file

Digital audio transducer samples real sound at the rate of 40 kHz and assigns 8 bits to each sample. Determine the size of one minute mono audio file?

  Designing a 4-to-16 decoder using not gates

Draw 4-to-16 decoder by using components. You must not use any extra components.

  Explaining publication of material in foreign languages

Which of the given statements about publication of material in foreign languages is not right? it is competitive neccessity or it must be accurate.

  Analyze the use of gestures in ipads

Analyze the use of gestures in iPads. Address how users feel about gestures and evaluate how users feel about the user input when it comes to filling out complicated forms on the iPad and assess the usability of back buttons and thumbnails on the iPa..

  The lisp function length counts

The Lisp function LENGTH counts the number of elements in the top level of a list. Write a function ALL-LENGTH of one argument that counts the number of atoms that occur in a list at all levels.  Thus, the following lists will have the following A..

  Can someone explain to me what is wrong

Provided is two functions. The function addLarge is called from main and is supposed to retrieve two strings from the user and print those strings. When I compile this code, only the second string prints. Can someone explain to me what is wrong?

  Explain dispatcher and data access object design

Prepare a two page paper comparing and contrasting five of design. Dispatcher - controls client access and re-directs or dispatches client requests to proper party which can be located on same or different tier.

  What is the sum after the following loop terminates

What is the sum after the following loop terminates? int sum=0 int ittem =0 do { item++; if(sum>=4)continue; } while(item

  How different backgrounds work with the fonts

Your presentation should include information about font size and icons, how they look with different backgrounds, and how different backgrounds work with the fonts.

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