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

  How vulnerable do think the united states is to such attack

How would the actions of a hostile nation be any different than the actions of a hostile (competing) foreign company?

  Write the implementataion of my animal class

Below is the header for my animal class. I need to create a derived class based on my animal class.

  Display both two-dimensional and one-dimensional array

For testing purposes, you may do a compile-time initialization of a 6 x 3 two-dimensional array. Display both the two-dimensional and the one-dimensional array.

  Merging transaction and analytical processing problem occurs

When merging transaction and analytical processing a problem occurs. Real-time analytical processing diminishes the performance of transaction processing. What is the solution to this problem that many companies use?

  Design an application to take and process a pizza order

Design an application to take and process a pizza order. The user should be able to make pizza order choices from listboxes, and the application should display the order price.

  Estimate benefit of a revenue-generating system

Is management able to estimate the benefit of a revenue-generating system or must the system be built on faith? Why?

  Design a program to produce a sales report

Design a program that will read a file of sales records and produce a sales report. Each record in the file contains a customer's ID, name, a sales amount, and a validated GST code.

  Create a website registration form to obtain

Create a website registration form to obtain a user's first name, last name, and email address. In addition, include an optional survey question that asks the user's year in college (e.g., Freshman). Place the optional survey question in a details..

  Describe the different parts of the cia triad

Describe the different parts of the C.I.A. triad and how each can be used to improve the overall security of an information system.

  Write a program that creates a 4x3 array of integers

Write a program that creates a 4x3 array of integers. Populate the array with random numbers between 0 and 200. Sum up the values in each column and display the three sums to the screen.

  The three common security goals

1. Confidentiality, integrity, and availability are the three common security goals. Select at least three security vulnerabilities that could jeopardize and compromise a database. Classify each vulnerability with being technical, managerial,..

  Write an application that does the following

Write an application that does the following: (1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values

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