Home‎ > ‎ICT Programming‎ > ‎

The Cellphone Class

Cellphone Class 

For this lab you will begin to create a class called CellPhone. Here are the attributes of a cell
phone that we are concerned with for the purpose of this project:

 brand, e.g. Samsung Galaxy
 model, e.g. S3
 weight in grams
 storage capacity (in GB)
 does it have a front camera?
 what is the operating system?
 does it have wi-fi?

Choose descriptive names for the fields (instance variables) and declare them. Be sure to specify
that they are private.

Write a constructor for this class. The constructor will expect all the information to be passed in
as parameters. Choose descriptive names for the parameters but remember that they cannot be
the same as the field names. Use the parameters to initialize the fields.

* Copy the same format from the Dog and Student class. Just change the variables and object names to match the required categories from above *


Comments