SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 305 Weeks Ago, 1 Day Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 28 Nov 2017 My Price 9.00

student class below such as name, address, major,

Add additional information to the student class below such as name, address, major, and contact information along with all the getters and setters (methods) needed to access all data. Submit your code along with a sample run of your program. Comment all your code. Cite any sources of information you use.

// ShowStudent.java
// client to test the Student class
class ShowStudent
{
public static void main (String args[])
{
Student pupil = new Student(); // We need a new student named pupil
pupil.setIDnumber(234); // We are setting pupil's ID number to 234
pupil.setPoints(47); // We are setting pupil's points to 47
pupil.setHours(15); // We are setting pupil's hours to 15
pupil.showIDnumber(); // We are showing pupil's ID number
pupil.showPoints(); // We are showing pupil's points
pupil.showHours(); // We are showing pupil's hourse
System.out.println("The grade point average is " +
pupil.getGradePoint()); // we are calculating pupil's GPA
}
}
class Student // this is the student class
{
// the private data members
private int idNumber;
private int hours;
private int points;
// Constructor creates a new student
Student()
{
idNumber = 9999; // a max ID
points = 12; // starting out assuming 12 points
hours = 3; // starting out assuming 3 hours
}
// end of constructor 
// the public get and set methods fro pulil specific information
public void setIDnumber(int number) // pass in a number
{
idNumber = number; // assign the number
}
public int getIDnumber() // return a student ID
{
return idNumber;
}
public void setHours(int number) // pass in a number
{
hours = number; // assign the number to hours
}
public int getHours() // return the student's hours
{
return hours;
}
public void setPoints(int number) // pass in a number
{
points = number; // assign number to points
}
public int getPoints() // return the points
{
return points;
}
// methods to display the fields
public void showIDnumber()
{
System.out.println("ID Number is: " + idNumber);
}
public void showHours()
{
System.out.println("Credit Hours: " + hours);
}
public void showPoints()
{
System.out.println("Points Earned: " + points);
}
public double getGradePoint() // calculate the GPA with internal data
{
return (points * 1.0 / hours);
// simple integer division will truncate the decimal places
}
}

Answers

(5)
Status NEW Posted 28 Nov 2017 12:11 PM My Price 9.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)