User Tools

Site Tools


haas:fall2010:data:eoce


Corning Community College


Data Structures



End of Course Experience

~~TOC~~

Rules

Presented within will be various questions evaluating your knowledge and experience gained this semester. In places where you are able, the more you write and explain topics the better the chance you will have of receiving full credit (and alternatively, the more credit you will receive should something be incorrect). Note that I'm not just looking for answers; I'm looking for responses and solutions. Show me that you understand the problem and any particular outcome.

The questions on this experience are open resource with the exception of other individuals. In that respect, it is CLOSED PERSON. This means you are not to communicate with other people (either in the class or otherwise), in real life or electronically. Use your own knowledge, use your skills, and use your ability to access the allowed resources to aid you in coming up with your well thought out answers to each question.

You are allowed, and expected, to ask me questions, so that a problem can be better clarified.

You are to do all questions. Submission is to be in an organized and easy to read format in a plain text file, such as in an e-mail with attachments on Lab46, sent to (wedge@lab46.corning-cc.edu or haas@corning-cc.edu) and yourself.

You have until 11:59:59pm (that's 23:59:59 in 24-hour time) Friday, December 17th, 2010 to complete and submit this to me.

If desired, our scheduled finals week meeting time is: Tuesday, December 14th, 2010 from 11:15am-2:15pm in C002 (our regular room).

Good luck!

0x0: Palindromes

A palindrome is a word that is spelled the same way forwards and backwards.

For example, words like bob, mom, pop, radar, and racecar are palindromes, for you can reverse them and end up with the exact same thing.

Program Criteria

Write me a program, utilizing libraries from our backgammon data structures code, that test whether or not a string (or array of char) input from the user is a valid palindrome. Be sure to include adequate comments and documentation of the process you are undertaking.

Of particular note- you must make use of a linked list-based stack (libstack.a) for palindrome testing, specifically utilizing the push and pop functionality inherent to stacks.

Be sure to display the word both “before” and “after”, along with a message indicating its validity as a palindrome.

Sample Output

Some example output may be:

lab46:~/eoce/data$ ./palindrome
Enter string to check: bob
Before: bob
After: bob
"bob" is a palindrome!
lab46:~/eoce/data$ ./palindrome
Enter string to check: star
Before: star
After: rats
"star" is NOT a palindrome!
lab46:~/eoce/data$ 

EoCE Program Submission Criteria

Please submit, along with the rest of the materials to this End of Course Experience, your solution to this problem that meets the following criteria:

____ Source code organization
     ____ any function prototypes are grouped together
     ____ any function declarations are grouped together
     ____ all variables are declared at the top of function (or code if global)
     ____ standard preprocessor directives (includes, defines) are at top of code

____ Source code is neat and easy to read
     ____ indentation with tabs is used
     ____ all code is uniformly indented
     ____ there is no double spacing of code
     ____ no line of source spans longer than 80 characters
     ____ is in plain ASCII text format
     ____ UNIX-style line endings
     ____ variables are intuitively named
     ____ formatting spaces around all relational operators

____ Source code has an identifying comment block at the top
     ____ indication of source program name (include file extension)
     ____ brief synopsis (the purpose of the program/what it does)
     ____ author (I hope this has your name), and any version/date information
     ____ compiling instructions/command line to create executable
     ____ is at least 8 lines long, inclusive of blank commented lines

____ Source code has informative comments throughout
     ____ at least 8 occurrences of in-code comments
     ____ explanation of process undertaken as code progresses
     ____ explanation of any algorithms used or purpose of utilization

____ Program compiles and executes without error*
     ____ no warnings (unless I've pre-approved them)
     ____ no errors
     ____ using your own compiling instructions in code
     ____ no errors if used appropriately
     ____ can handle any appropriate combination of choices
     ____ no erratic output
     ____ no incorrect output
     ____ cleanly exits when the choice or condition is present
     * assume proper user input always takes place

____ Program operation is informative to the user
     ____ useful information is presented to the user at each input
     ____ as appropriate, output is generated as a result of actions taken
     ____ there is no guess work on the part of the user
     ____ if there is a menu, it should be displayed before input

____ Documentation of known program flaws/implementation shortcomings
     ____ any known shortcomings adequately listed/documentated
     ____ suspected deviations are mentioned
     ____ include in a comment block at the bottom of your code for this
     ____ if no known flaws/deviations exist, say so

0x1: Debugging

Provide your response to the following questions:

  • What importance can a debugger play in eliminating logical errors during program development?
  • What are some of the debugging strategies you might use to flush out a nagging logic problem?

0x2: Universal Implications

Provide your response to the following question:

  • If you were creating your own implementation of the universe, what data structure(s) would you use to store its structure?

Feel free to be philosophical. But certainly be verbose.

0x3: Prime Numbers

A prime number is a value which is evenly divisible by only 1 and itself.

A composite number is a value which has additional factors.

Program Specifications

Write a program that will calculate all the prime and composite numbers between 2 and a user-specified value (inclusive of 2 and the user-specified value), and stores all the discovered prime numbers in a linked list. All the composite numbers will be stored in their own separate list.

You are to use the linked list implementation from our class backgammon code (liblist.a).

Sample Output

lab46:~/eoce/data$ ./prime
Enter value to compute until (from 2 to): 18

Primes: 2 -> 3 -> 5 -> 7 -> 11 -> 13 -> 17
Composites: 4 -> 6 -> 8 -> 9 -> 10 -> 12 -> 14 -> 15 -> 16 -> 18

lab46:~/eoce/data$ 

EoCE Program Submission Criteria

Please submit, along with the rest of the materials to this End of Course Experience, your solution to this problem that meets the following criteria:

____ Source code organization
     ____ any function prototypes are grouped together
     ____ any function declarations are grouped together
     ____ all variables are declared at the top of function (or code if global)
     ____ standard preprocessor directives (includes, defines) are at top of code

____ Source code is neat and easy to read
     ____ indentation with tabs is used
     ____ all code is uniformly indented
     ____ there is no double spacing of code
     ____ no line of source spans longer than 80 characters
     ____ is in plain ASCII text format
     ____ UNIX-style line endings
     ____ variables are intuitively named
     ____ formatting spaces around all relational operators

____ Source code has an identifying comment block at the top
     ____ indication of source program name (include file extension)
     ____ brief synopsis (the purpose of the program/what it does)
     ____ author (I hope this has your name), and any version/date information
     ____ compiling instructions/command line to create executable
     ____ is at least 8 lines long, inclusive of blank commented lines

____ Source code has informative comments throughout
     ____ at least 8 occurrences of in-code comments
     ____ explanation of process undertaken as code progresses
     ____ explanation of any algorithms used or purpose of utilization

____ Program compiles and executes without error*
     ____ no warnings (unless I've pre-approved them)
     ____ no errors
     ____ using your own compiling instructions in code
     ____ no errors if used appropriately
     ____ can handle any appropriate combination of choices
     ____ no erratic output
     ____ no incorrect output
     ____ cleanly exits when the choice or condition is present
     * assume proper user input always takes place

____ Program operation is informative to the user
     ____ useful information is presented to the user at each input
     ____ as appropriate, output is generated as a result of actions taken
     ____ there is no guess work on the part of the user
     ____ if there is a menu, it should be displayed before input

____ Documentation of known program flaws/implementation shortcomings
     ____ any known shortcomings adequately listed/documentated
     ____ suspected deviations are mentioned
     ____ include in a comment block at the bottom of your code for this
     ____ if no known flaws/deviations exist, say so

0x4: Letter Arranging

Your task for this question will be to arrange a set of letters into their alphabetically sorted order.

Program Specifications

Write a program that will prompt the user to enter letters (all in the same case).

Each entered letter will be inserted into a node-based binary search tree (sorted, no duplicates).

When done, traverse the tree to display its contents from lowest to highest values.

You should use your own binary search tree implementation for this program (you can use the backgammon code as reference).

Sample Output

lab46:~/eoce/data$ ./bstree
Enter letter (. to quit): g
Enter letter (. to quit): b
Enter letter (. to quit): k
Enter letter (. to quit): z
Enter letter (. to quit): a
Enter letter (. to quit): q
Tree Letters are: a b g k q z

lab46:~/eoce/data$ 

EoCE Program Submission Criteria

Please submit, along with the rest of the materials to this End of Course Experience, your solution to this problem that meets the following criteria:

____ Source code organization
     ____ any function prototypes are grouped together
     ____ any function declarations are grouped together
     ____ all variables are declared at the top of function (or code if global)
     ____ standard preprocessor directives (includes, defines) are at top of code

____ Source code is neat and easy to read
     ____ indentation with tabs is used
     ____ all code is uniformly indented
     ____ there is no double spacing of code
     ____ no line of source spans longer than 80 characters
     ____ is in plain ASCII text format
     ____ UNIX-style line endings
     ____ variables are intuitively named
     ____ formatting spaces around all relational operators

____ Source code has an identifying comment block at the top
     ____ indication of source program name (include file extension)
     ____ brief synopsis (the purpose of the program/what it does)
     ____ author (I hope this has your name), and any version/date information
     ____ compiling instructions/command line to create executable
     ____ is at least 8 lines long, inclusive of blank commented lines

____ Source code has informative comments throughout
     ____ at least 8 occurrences of in-code comments
     ____ explanation of process undertaken as code progresses
     ____ explanation of any algorithms used or purpose of utilization

____ Program compiles and executes without error*
     ____ no warnings (unless I've pre-approved them)
     ____ no errors
     ____ using your own compiling instructions in code
     ____ no errors if used appropriately
     ____ can handle any appropriate combination of choices
     ____ no erratic output
     ____ no incorrect output
     ____ cleanly exits when the choice or condition is present
     * assume proper user input always takes place

____ Program operation is informative to the user
     ____ useful information is presented to the user at each input
     ____ as appropriate, output is generated as a result of actions taken
     ____ there is no guess work on the part of the user
     ____ if there is a menu, it should be displayed before input

____ Documentation of known program flaws/implementation shortcomings
     ____ any known shortcomings adequately listed/documentated
     ____ suspected deviations are mentioned
     ____ include in a comment block at the bottom of your code for this
     ____ if no known flaws/deviations exist, say so

0x5: Meaning

Of all the work you've done this semester in this course, identify something that was meaningful to you.

  • What is it?
  • Why does it stick out in your mind? Explain

0x6: Reflection

Answer me the following:

  • How did you feel about the course?
  • Was it useful/interesting to you?
  • What was your least favorite aspect, and why?
  • Any comments, suggestions?

0x7: Personal Assessment

After an exciting and intellectually challenging run, we're arriving at the end of this semester's journey. Some will be moving on, others sticking around for more. I make it a practice to listen to your thoughts and suggestions. The course, as we all experienced it, unfolds in a manner pertaining, in part, to how you respond to concepts and topics (do we need more time, can I crank it up a couple notches, etc.) so each semester and each class is entirely different from any other- because of each of you, and all of us, working together and learning together.

So, searching deep down within your soul- balancing reason with emotion, and considering attendance and timeliness; what grade do you feel you deserve for this course, and why? Justify your answer based on your own perceived performance to course ideals and content, not on need or desire.

haas/fall2010/data/eoce.txt · Last modified: 2010/11/30 20:39 by 127.0.0.1