Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Thread Tools Display Modes
ITSE1429 Assign5-RE
Junior Member
Status: Offline
Posts: 11
Join Date: Sep 2014
Default ITSE1429 Assign5-RE - 10-08-2014, 06:59 PM

ITSE1429 Assign5-RE
In order to do well with Alice, here are some observations about selection:
The programming exercise that asks us for three different courses of action is effective to learn about the if/else concept. This is because it has enough complexity that we have choices on how to set up the logic in our Alice world's methods.

For example, a nested if/else can be used. The resulting logic automatically appears in our Alice world in a neat indented fashion and this aids readability to our human eyes as we view the logic. It also shows that a consideration for choosing to use a particular logic pattern such as nesting may be in how much readability is affected as logic extends down into multiple levels of depth.

If you used a nested if/else you have seen that successive nesting indents to the right. When requirements dictate a need for more than three possiblities additional if/else nesting results in continual rightward indentation. Hypothetically then, what happens if there is so much if/else nesting that statements go so far to the right that they begin to wrap around to the next line? The computer handles it but human code readers may become exasperated.

Having good readability is important for initial desk checking the progarm logic and for later ease of maintenance.

Reply With Quote

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 ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.