I'd like you all to post your Encapsulation homework here:
Upload your text files or .as files and we'll hopefully get a few comments going.
Choose from at least 3 of the following Scenarios and give me a description of the name of a Class, the properties of that Class, and its functions. Go ahead and use UML Class Diagrams if you wish, or just list everything out, or even make actual .as files if you’re ambitious. Don’t worry about filling in the actual code, though a short explanation of what each function does would be helpful to those reading the code. We only need one Class per scenario.
Dance Tutorial:
Finish up the Class we started in class: DanceTutorial. Each DanceTutorial will have a sound element, a text element, and an animation element. There will be DanceTutorials for any number of actual Dances.
Pac-man Baddies:
You remember those ghost-dudes that pac-man was running away from (Binky, Blinky, Winky, or whatever they were named)? Make a class that encapsulates those bad guys. You might consider things like whether they’re running towards or away from Pac-Man, if they’ve been eaten, their direction, position, etc.
Employees:
Your company needs a simple employee-management application to keep track of how much vacation/sick time each employee has left for the year. Each employee needs to be represented in data with things like name, emergency contact info, etc. There are 3 types of time off: sick leave, floating holidays, and vacation.
Pages:
You are creating a children’s e-book where a user can flip through any number of pages. Each page has text, a background image, and any number of interactive animations. Each page needs to contain positioning information about the text and animations, as well as which animation to start first.
Temperature gauge:
You’re making a widget on your web page that shows the temperature. The gauge is a different color depending on what the temperature is. All data is received in Celcius, but it can be converted to Celcius, Fahrenheit, or Kelvin.
Tags:
Share
-
▶ Reply to This