Select Categories Below
Status: Closed Points: 75 Time: 06:23 - Aug 24, 2006
multani.sarbjit
Define a set of classes and methods to model these entities: - a Light that you can turn on and off - a Light that you can turn on and off and also set to a specific light level e.g. 50% brightness. - a Scene which contains a number of Lights, with a level specified for each Light o a Scene can be turned on or off o Lights can be in multiple Scenes o A Light is only turned off if all Scenes that it is part of are off In our scenario we have 2 Scenes (A and B). Scene A - Lights 1 (on), 2 (on), and 3 (50%). Scene B - Lights 3 (70%), 4 (on), and 5 (on) Write some client code that will create the objects to model our 2 Scenes, turn on both scenes, then turn off Scene B. Please show the implementation that will allow Light 3 to stay on after Scene B is turned off. Sample answer : Scene pSceneA, pSceneB; pSceneA = new Scene pSceneB = new Scene pSceneA.AddLight( new Light(“1”), 100 ) pSceneA.AddLight( new Light(“2”), 100 ) pSceneA.AddLight( new Light(“3”), 50 ) pSceneB.AddLight( new Light(“3”), 70 ) pSceneB.AddLight( new Light(“4”), 100 ) pSceneB.AddLight( new Light(“5”), 100 ) pSceneA.On() pSceneB.On() pSceneB.Off() any solution please!!!!
Categories:
Add Categories
When adding more than one category, separate them with commas.
Advertisement
admin
Date:: Aug 22, 2007
Time:: 20:17
multani.sarbjit, did you get your question solved? If you did then please close this question and distribute the points. If you found the solution on your own, we would be very happy if you could explain it here for the sake other users having the same problem. If you didn't get a solution to your problem, please leave a comment here to let the experts know that you're still looking for an answer. Thanks, The Quomon Admin Team
Date:: Sep 14, 2007
Time:: 00:11
Admin, Thanks for the remainder.
Question Answered
This question has been closed, and points have been rewarded to the following experts:
You're welcome however to comment or give additional information or if you wish, you have the ability to write an Answer Summary for the Summary Area.
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
How do I vary the height of a frame depending on t...
Dynamically I created ASP.NET user control using A...
I want to delete a cookie of a different domain fr...
hover gallery.
How long does Google and MSN store emails that can...
Does the United States Government have a CIO posit...
You have 100 characters to use
Rank
Expert
Points
1.
6232
2.
4221
3.
3650
4.
2807
5.
2698
6.
1953
7.
1820
8.
1000
9.
812
10.
695
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software Real Estate Postcards Marketing Fulfillment