|Skill Test - Final|
Design a House Electricity-Use Simulation, that allows the user to see the electrical use of a refrigerator, an air conditioner, and the lights in four different rooms. Your simulation will allow a user to set the outside temperature of the house, as controlled by the weather, and the inside temperature, as controlled by the air conditioner. The lights in the four rooms will be fixed at 200 watts, 150 watts, 120 watts and 120 watts. The user will only control whether the lights are turned on or off in each room. Likewise there will be a fixed formula to calculate how much electricity the refrigerator uses, and how much electricity the air conditioner uses depending on the inside and outside temperatures of the house. The instructor will draw a typical user interface for this simulation on the board.
You must design your simulation with the following six classes:
House, Refrigerator, AirConditioner, Light, ElectricMeter, UserInterface.
You are only responsible for designing the model and controller portion of the simulation. You may assume that you will add an additional class for the view later, but you do not need to add that to your design now.
The UserInterface will have the following six controls:
A control so the user can enter the inside temperature for the AirConditioner.
A control so the user can enter the outside temperature, also for the AirConditioner.
A on/off control for each light.
The ElectricMeter gets the current electricity flow from the Refrigerator, the AirConditioner, and all four lights, and then totals them to get the current total Electricity flow. When the view is added to the design, that total will be displayed on the screen.
You are responsible for designing a relationship diagram, and the public interface for all six classes..
This is an open book, open notes, paper and pencil test. You may use any text, notes, and you can access anything on your computer except help from another individual. You may not get any help from any other person during the test except the instructor. You may ask the instructor any questions you like.
The Final Skill Test will be worth the following 10 points toward the final course grade:
3 points: Your written relationship diagram clearly depicts all the necessary relationships between the six classes, and those relationships will successfully implement a solution to the problem. Your diagram matches the function prototypes.
2 points: Your prototypes successfully set up all the relationships in your diagram, and those relationships will successfully implement a solution to the problem.
3 points: Your prototypes contain all the necessary methods, with the proper parameters and return values, to implement a solution to the problem.
2 points: Your design is a logical object oriented solution to the problem, that appropriately uses relationships between the specified classes to implement the solution, and avoids concentrating the code inappropriately in one or two classes.
Wednesday, May 8th.
|Office: B132||Phone: firstname.lastname@example.org|