IntroSoftwareDevelopment1Lab1b

lab 1a On this piece of apper, describe the data (instance variables, including data types) and behaviours (methods) that you would associate with the following classes. Choose very descriptive, unambiguous names. Including the expected IEtTeEr cASe too. Methods are naemd as verbs. Show your instructor when you are finished. When you rinstructor is satified your paper will be signed and you can move on to lab 1b.

Data Student Class:

class Student {

//instance variables:

String firstName; String lastName; String studentNumber; int classNumber; String className; boolean fullTime;

}

Car Class:

class Car {

// instance variables:

String makeModel; String color; String vin; boolean gas; int passengers;

}

Move Class:

class Movie {

String movieTitle; int yearRelease; String director; double budget;

}

Methods Student Class:

changeName() transferClass() getGPA() withdraw()

Methods Car Class:

changeColor() removeSeats()

Methods Movie Class:

changeMovieTitle() changeBudget()

Lab 1b

  • Open BlueJ and create three classes (data only; no methods) from lab 1a.
  • Name your new project Lab 1b.
  • Give appropriate data types (String, int, char, boolean, double) to your data.
  • Data must be declared private.
  • Indent and align and comment your code as in the example below.
  • Use proper capitalization for your class and variable names.
  • Make sure all three classes compile.
  • Create an object of each class (the red square below).
  • Show your instructor when you are finished.
  • When your instructor is satisfied he will sign your paper and you can go home. There is a quiz next day but no homework.