For the data descriptions listed below, list all of the data and categorize them as either mutable or immutable. Some of the descriptions could be represented multiple ways, so be sure to explain your choice. A couple of examples are provided.
Data Description |
Mutable Data |
Immutable Data |
Explanation |
A student |
- name
- email
- phone number
- mailing address
- grade level
|
- student id number
- birthday
|
- name's can change due to adoption or marriage
- email addresses and phone numbers change all the time
- A student can move changing their physical address. The physical address itself is immutable.
- A student id number and their birthday does not change.
|
A vehicle registration |
- vehicle owner
- license plate
- number of miles on the car
- the value of the car
|
- vin number
- year created
- make
- model
|
- Cars get sold to new owners all the time
- License plates change on the vehicle
- As we drive the car we add more miles to the car
- As the car gets older, it's value decreases
- The vehicle's vin number doesn't change
- The year a vehicle was created can't change
- The make and model of the car doesn't change
|
A meteorite landing |
|
|
|
A card in a deck of 52 cards |
|
|
|
Items in a vending machine |
|
|
|
Movie premiere |
|
|
|
A city |
|
|
|