Download presentation
Presentation is loading. Please wait.
1
In Class Exercises
2
TV Think about your television as an object. You send messages to it using the remote control. What messages can you send? What data is needed to represent the state of the TV?
3
Song Class Think of a Song as an object What data does a song have? Can you think of any applications that might use song objects? Can you think of any methods a song might need?
4
Song Manager Think about an application that manages the music (songs) stored on your computer. What classes would you need for such an application? For each, list necessary data methods
5
Identifying Classes Pick a favorite game List all the objects used in the game Identify any data that is associated with your objects What messages need to be sent to the various objects you identified?
6
Making Change Write a program that reads purchase price and amount tendered and displays change Input values should be number of cents Output Price, amount tendered and change in currency format number of dollars and number of each coin
7
Output format Purchase Price: $ 34.80 Amount Tendered: $ 40.00 Change : $ 5.20 5 dollars 0 quarters 2 dimes 0 nickels 0 pennies
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.