Lesson 1: The Theater
45 minutes
Overview
What can I make with The Theater?
Students are introduced to The Theater and explore its components and functionality. Students review the documentation for The Theater and an existing program to learn about its classes and methods, then practice using them to play sounds, create drawings, and show images.
Agenda
Objectives
Students will be able to:
- Call methods from existing classes
- Read API documentation to identify available classes and methods and their functionalities
Preparation
- Print copies of the Unit 4 Guide (one for each student)
- Print copies of the Investigating The Theater handout (one for each pair of students)
- Check the Teacher's Lounge for verified teachers on the CSA Forum to find additional strategies or resources shared by fellow teachers
Links
Heads Up! Please make a copy of any documents you plan to share with students.
For the students
- Investigating The Theater - Handout
- U4L1 Extra Practice - Handout
- Unit 4 Guide - Handout
- Welcome to The Theater - Video
Teaching Guide
Warm Up (5 minutes)
Software Engineering Goals
Remarks
In the previous unit, you learned about how we can organize and analyze data to find information as we continued developing your software engineering skills. We will be learning more about how we can work with data in Java programs and continue to use software engineering characteristics and skills to make design decisions and develop more robust algorithms.
Distribute: Give each student a copy of the Unit 4 Guide.
Discuss: Use the Retrieve-Pair-Share strategy to discuss the prompt, then have students note their goals on the Unit 4 Guide.
- What software engineering characteristics do you want to work on in this unit?
- How will you know you grew in this area by the end of the unit?
Discussion Goal: Students share characteristics and skills that they want to improve and identify goals.
Students can choose any characteristic or skill they want to improve, regardless of whether it is an area for improvement. Students can choose a characteristic that is a strength that they want to further develop as an anchor for upcoming units, or they can choose a characteristic that is an area for improvement.
Activity (35 minutes)
Investigating The Theater (20 minutes)
Remarks
We have used packages like The Neighborhood and from the Java API to work with user input and files in our programs. In this unit, we will work with a package that contains classes that make up The Theater.
Do This: Review the lesson objectives.
Display: Show the video – Welcome to The Theater.
Group: Place students in pairs.
Do This: Direct students to Level 1 on Code Studio to investigate the program with a partner. Students make the changes to the program as prompted.
Discuss: Click through the animated slide to display the prompts.
- What do you notice about the code in this program?
- What do you wonder about the code in this program?
Discussion Goal: Students notice that the program creates a Scene
object and calls methods to draw shapes and images and play sounds. Students may wonder if they can extend the Scene
class like they extended the Painter
class or what types of programs they could create using The Theater.
Distribute: Give each pair a copy of the Investigating The Theater handout.
Do This: Introduce the Theater
and Scene
classes.
Ask students to identify the attributes and behaviors of each class.
Students may wonder why the Theater
class is final
and why its methods have the keyword static
in their method signatures. Have students recall what the final
and static
keywords meant for static variables and constants in the previous unit. Point out that this means that they cannot create a Theater
object but can call its methods using the dot operator the same way they accessed static variables in the previous unit. Final classes and static methods are covered in more detail in a later lesson.
Do This: Direct students to Level 2 on Code Studio to access the documentation for The Theater and complete the Investigating The Theater handout.
Do This: Click through the animated slides to introduce the classes and methods in The Theater:
- The
Scene
class - The
drawImage()
method - The methods to draw shapes
- The
playSound()
andplayNote()
methods - The
pause()
method - The
Theater.playScenes()
method
Exploring The Theater (15 minutes)
Remarks
The Theater allows you to create many types of visuals and animations, as well as play and manipulate sounds. Let's practice using some of the methods in The Theater!
Do This: Direct students to Level 3 on Code Studio to complete Levels 3, 4, and 5. Students complete choice levels to draw images, draw shapes, and play sounds.
Wrap Up (5 minutes)
Using The Theater
Remarks
There is a lot you can do with The Theater, and there are more capabilities that we have not yet explored. We'll start with the capabilities you explored today in this unit to create interesting visuals and animations.
Discuss: Click through the animated slide to display the prompts. Use the Retrieve-Pair-Share strategy to discuss the prompts.
- What are things you could make using The Theater?
- How could you use The Theater to create visuals of the data you worked with in the previous unit?
Discussion Goal: Students share ideas about visuals and animations they want to make using The Theater. Students suggest ways to visualize the data they worked with in the previous unit, such as creating drawings and images or animating the data to demonstrate patterns and information.
Ask students where they have seen data visuals before, such as charts and graphs or infographics. Have students consider why someone would choose to convey information visually compared to the projects they created in the previous unit.
Do This: Review the concepts covered in this lesson.
Assessment: Check for Understanding
Check For Understanding Question(s) and solutions can be found in each lesson on Code Studio. These questions can be used for an exit ticket.
This work is available under a Creative Commons License (CC BY-NC-SA 4.0).
If you are interested in licensing Code.org materials for commercial purposes contact us.