Student - { Student one = new Student();

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
class Student { private String name; private int id; private int cHrs; private int qPoints; private double gpa; private String major; public void setName(String n) { name = n; } public String getName() { return name; } public void setId(int i) { id = i; } public int getId() { return id; } public void setHours(int h) { cHrs = h; } public int getHours() { return cHrs; } public void setQuality(int q) { qPoints = q; } public int getQuality() { return qPoints; } public void setGpa(double g) { gpa = g; } public double getGpa() { return gpa; } public void setMajor(String m) { major = m; } public String getMajor() { return major; }} public class ShowStudent { public static void main(String[]args)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: { Student one = new Student(); one.setName("Jamel"); one.setId(900412573); one.setHours(49); one.setQuality(32); one.setGpa(3.09); one.setMajor("Computer Science"); System.out.println("The Student's name is " + one.getName()); System.out.println("The Student's ID is " + one.getId()); System.out.println("The Student's earned hours are " + one.getHours()); System.out.println("The Student's Quality points are " + one.getQuality()); System.out.println("The Student's GPA is " + one.getGpa()); System.out.println("The Student's Major is " + one.getMajor()); }}...
View Full Document

Page1 / 2

Student - { Student one = new Student();

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online