3. • Represent the real world
Baby
Name
Gender
Weight
Decibels
# cry so far
Object oriented programming
4. • Objects group together
Primitives (int, double, char, etc..)
Objects (String, etc…)
Baby
String name
boolean isMale
double weight
double decibels
int numCry
Object Oriented Programming
5. • Why not just primitives?
// little baby ram
String nameRam;
double weightRam;
// little baby Sham
String nameSham;
double weightSham;
Why use classes?
6. • Why not just primitives?
// little baby ram
String nameRam;
double weightRam;
// little baby Sham
String nameSham;
double weightSham;
// little baby Sham2
String nameSham2;
double weightSham2;
Why use classes?
500 Babies? That’s Confusing!!!