Fri, 1 Nov 2013, 03:19
Is there one correct program to solve a design problem? A student writes: > Hello Dr. Patt, > > I finished my program but didn't use any jump instructions. I also didn't > use the method of putting conditions into R0,R1,R2 to determine whether or > not to move on to the next node or if it's null or not either. You told us > about this method on Monday. > > Will I get points counted off for not doing this? Is my program suppose to > be using these things? > > Thanks > > <<name withheld to protect the student asking if there is only one right way>> The short answer: No, you will not "get points counted off for not doing this." The longer answer is that programming is about *design*, and there are many, many designs that solve the same problem. When mice is the problem, some people design better mouse traps, other people buy cats. Most design problems actually have many optimal solutions, depending on what you are trying to optimize. Faster execution time, cheaper cost, minimum amount of energy consumption - each criterion produces a different optimal solution. In EE 306, I am interested in peeling away the magic, and part of the way to do that is have you design programs to solve different types of programs. Program 3 involves querying a binary search tree. How your program does it is up to you. Good luck getting the program done by Sunday night. Yale Patt