Classifying Data
Grab a Piece of Paper! Define Data
For each data description:
- Determine whether a primitive data can be used to represent the data or if you need to use a reference type.
- If a primitive data type can be used, which of the 4 data types would be best to use to represent the data? The 4 primitive data types we are using are:
int,double,char,boolean. - Some of the descriptions could be represented multiple ways, so be sure to explain your choice.
| Data Description | Primitve or Reference | Data Type | Explanation |
|---|---|---|---|
| A student's age | |||
| The grade a student is in | |||
| Student's GPA | |||
| A Game Score | |||
| Whether you want to continue the game or not | |||
| A middle initial | |||
| The color of a block | |||
| Whether someone is married or not | |||
| Price of a menu item | |||
| The number of degrees to rotate a robot to the right | |||
| The date for the first day of school | |||
| The number of minutes until your order is ready | |||
| The name of the school | |||
| Price per unit for fruit | |||
| Your street address | |||
| A customer's phone number | |||
| A meteorite landing that includes the name of the meteorite, the date it landed, its mass, and landing location | |||
| A spinner that has 4 equal sections each with a different color | |||
| A card in a deck of 52 cards | |||
| The response from an invited guest for whether they are attending a party or not |