Determine a Data Type
Overview
In this lesson, students will begin to develop an understanding of the different types of data that are stored by the computer.
Learning Objectives
- 1.1.B.1 Determine the type of data that is being stored.
- 1.1.B.2 Distinguish between primitive data types and non-primitive data types (reference types), including String.
Skills
- S1.B Design algorithms for a program.
- S1.C Explain the impact design has on data storage.
- S2.A Write program code and implement algorithms.
Student Outcomes
Students will be able to:
- determine the data that needs to be stored
- recognize the difference between primitive data and reference data
- recognize how to group data together
Duration: 1 class period
Resources
Warm-up / Motivate
Ask students to think of a game that they play regularly, either on their phone or on the computer (they could also use the board game they played to generate an algorihtm). Have them pair up with another student that has the same game. Students may need to change their game of choice to a different one so that all students are in groups of 2 - 3. Set a timer for 2 minutes and have students individually list the data that the program uses to run. Now that they have a list of data, ask them to take 2 minutes to individually catalog where this data originates from. Is the data:
- input from the user?
- input from another source?
- preset in the program?
- generated during the play of the game?
Have students share their lists and classification, refining the list with their partner. Have the pairs create 1 slide with the name of the game and then four columns, one for each data source, listing the data in each column. Print these out and have students hang them up in the room.
Have students do a gallery walk with post-it notes to add comments related to data that might have been forgotten and needs to be added.
Learn
Either as a group or on their own, review the tutorial: Learn - Introduction to Determining A Data Type
Check in with students to see if there are questions about the practice included in the learn tutorial.
Practice
Practice classifying data: Practice - Classifying Data
You can have students submit the answers to the practice for a grade.
Have a class discussion about any data descriptions that students struggled to classify or classified in differing ways.
Wrap-up / Extend
Improve Game Data
Have students improve their lists of data for their games (from the discussion above) by adding the data types for each piece of data.
Flash Card Next Day Warm-up
Write descriptions of data on index cards. As students enter the classroom, provide each students with one of the cards. Have them write the data type for their description on the back of the card. Ask them to share with a student next to them and explain why they choose that data type. Does their partner agree or disagree? Is their another data type that might be suitable?
Next Lesson
Lesson Plan: Declaring and Initializing Variables