




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Chapter 8 Overview
A CLASS is a template (specification, blueprint) for a collection of objects that share a common set of attributes and operations.
HealthClubMember Class
Objects
attributes operations
primitive types int, long, short, byte, float, double, boolean, char objects String, CD, Gymnasts, … arrays define a linear grouping of primitive types or objects
studentGrades
which can be referenced using studentGrades[#] where # is the particular student you want to look at.
public class Test() { private int x1, x2,x3;
public Test() { x1 = 10; x2 = 20; x3 = 30; } }
declare 3 integer variables
private class TestArray() { private int [] x;
public TestArray() { x = new int[3]; x[0] = 10; x[1] = 20; x[2] = 30; }
declare 1 array with 3 elements
seen yet: