UserDefinedClasses2[1]

UserDefinedClasses2[1] - d. Write a class named...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 106:  User-Defined Classes (Ch 8) 02/23/09 1.  a. Create a class named Student.  A  Student has fields for name, ID number, number  of credit hours earned, and number of quality points earned, grade point average and  major.  Include methods to assign values to all fields. b. Write a class named ShowStudent that instantiates a Student object and  demonstrates the use of set and get methods. c.  Create a constructor that initializes the first three fields.  Demonstrate that the  constructor and remaining set and get methods work properly, in a ShowStudent1.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: d. Write a class named ShowStudent3 that instantiates a Student object from the class you created and assign values to its fields. Compute the Student grade point average, and then display all values associated with the Student. e. Create a constructor for the Student class. The constructor should accept ID and should initialize points to 12 and credit hours to 3.0. Instantiate an object to demonstrate that the constructor works properly....
View Full Document

This note was uploaded on 10/04/2010 for the course COMPUTER S 106 taught by Professor Moore during the Spring '08 term at Clark Atlanta.

Ask a homework question - tutors are online