Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
Assignment 5 ITSE 1429
Old
cyclonejack
Junior Member
 
Status: Offline
Posts: 9
Join Date: Jul 2014
Default Assignment 5 ITSE 1429 - 07-25-2014, 11:43 AM

Within this assignment we are in the beginning stages of giving logic to objects within our world. This particular assignment took some deep thinking in that it was necessary to hit upon a certain value to achieve a certain result. In this case it was an age. Any value over or under the value of 21 then the user was denied their goal. Only with defining the value of 21 was the user able to accomplish their goal. To accomplish this I was to use the if/else statement within a method. This lead me to an interesting conclusion. There would be several ways to accomplish this type of behavior. I could have defined an if portion as equal to 21 and then the else portion to be greater than or less than 21 to call other methods. Instead what I ultimately did was to define the if portion as being greater than 21 then add yet another if/else statement. From there I once again defined the if portion as being less than 21 and , interestingly enough, the only value left from these two statements would be the correct value of 21.
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2023, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.