homework 3

homework 3 - import java.util.Random; /* * Write a...

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

View Full Document Right Arrow Icon
/** * Write a description of class CSC121 here. * These are the instance fields of the class CSC121. * * @author (Lindsie Pettie) * @version (April 1, 2008) */ public class CSC121 { // instance variables - replace the example below with your own private String className; private int classNumber; private String profName; private Student[ ] student; private Random r; /** * These are the two constructors. * the first has no parameters and gives initial values to the instance fields. * It creates the array and instantiates the Student objects. * The second constructor has 3 parameters and does the same thing as the first. */ public CSC121() { className = "CSC"; classNumber = 121; profName = "Khadija"; student = new Student[25]; for(int i=0; i< student.length; i++) student[i] = new Student(); } public CSC121(String newClassName, int newClassNumber, String newProfName) { className = newClassName; classNumber = newClassNumber; profName = newProfName; for(int i=0; i< student.length; i++)
Background image of page 1

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

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

This note was uploaded on 04/17/2008 for the course PHYS 120 taught by Professor Decarlo during the Spring '08 term at DePauw.

Page1 / 3

homework 3 - import java.util.Random; /* * Write a...

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