GSP 295 Week 3 iLab

For more classes visit www.snaptutorial.com Deliverables A single zip file including the following: · Your Visual Studio Project directory and associated files, including source files for the Lab. · The results of your testing. What tests did you run? Did everything work okay? Are there outstanding issues in your program? A short half-page summary of your results is about the right length. · You do not need to submit your test plan, but it doesn’t mean you shouldn’t have one! · Remember, for this Lab you must also submit the answers to the Part 5 questions. If you document any issues, it will be easier to isolate any problems, provide detailed help, and could potentially improve your grade. Summary In this Lab, you will use recursion and implement an efficient sorting mechanism to solve common problems dealing with strings. Part 1:Understanding Plindromes Palindromes are funny little phrases. They can be words, sentences, or even numbers or other characters. Formally, a palindrome is a string that is the same when its characters are reversed. For example, classic palindromes are the following. · ana · civic

· radar · 122221 · deed · toot · racecar · step on no pets · tattarrattat Further, we will define some specific classification for palindromes for the purpose of this assignment. Type 1 Palindrome: Every character has the same number of occurrences. Type 2 Palindrome: Characters may have different numbers of occurrences. For example: · ‘ana’ is a type 2 palindrome because there are 2 ‘a’ characters but only 1 ‘n’ character. · ‘civic’ is a type 2 palindrome because there are 2 ‘c’ characters, 2 ‘I’ characters, but only 1 ‘v’ character. · ‘tattarrattat’ is a type 2 palindrome – there are 6 ‘t’ characters, 4 ‘a’ characters and 2 ‘r’ characters. · ‘deed’ is a type 1 palindrome – there are 2 ‘d’ characters and 2 ‘e’ characters. Order of a Palindrome: The number of occurrences of the alphabetically first character in a palindrome. For example: · ‘ana’ is of order 2 because there are 2 ‘a’ characters which are alphabetically before ‘n’. · ‘deed’ is of order 2 because there are 2 ‘d’ characters and two ‘e’ characters. · ‘nopapon’ is of order 1 because there is only 1 ‘a’ character which is alphabetically first. Notice that in a type 1 palindrome, the order will be the number of occurrencesfor all characters.

Go through the list of palindrome examples to ensure that you can describe the type and order of each. Do some web research to find fun palindromes of your own for testing and determine their type and order. Assumptions: For the purposes of this assignment, in the interest of time, we’ll exclude palindromes that are only palindromes by ignoring spaces and punctuation. For example, “A man, a plan, a canal: Panama” would not be a palindrome for our purposes because there is no matching “:” character, and even if the punctuation is removed, spacing differences invalidate this palindrome. You will also not need to worry about capitalization. For example ‘Ana’ is not a valid palindrome in our world because an ‘A’ is different than an ‘a.’ Part 2: Implement a Palindrome Detector For this assignment, you will create a test driver that asks for a string from the user and processes this string in several ways. The first of these is to determine whether the string is or is not a palindrome. First, create a main function that accepts an arbitrary string from the user, makes a call to a recursive palindrome detecting function, and then outputs to the console whether or not the entered string is a palindrome. Next create a recursive function that detects whether or not a string is a palindrome. Remember to follow the appropriate steps to create a recursive implementation. What are the base cases? What is the recursive case? For this assignment, you may use the internal string class to read a string from the user and access the string itself; however, you may not use other string functions. It is good general practice to create a class for all of your programming. Even though we are not creating an ADT this week, you should still create a class to hold your palindrome functions Part 3:Sorting the Input Next, we want to determine the type and order of the palindrome. Because you’ll need to find out how many characters are present from the alphabetically first character in the string, an efficient sorting mechanism is important. Implement a function that performs a recursive Merge Sort on the string of characters read from the user. Your textbook describes the programming details of Merge Sort in detail.

General iLab Comments All coding assignments for this class will be using Microsoft Visual Studio. This is available through the Software Store, which can be found in Course Home. Contact the help desk if you encounter any issues or contact your professor. *Please note as a reminder that you may not copy code from any web reference to complete this assignment, even if you correctly give credit. You may of course use web references to help you understand, but you must code the assignment yourself. You may use code directly from your textbook where applicable, but do make sure you give credit in your comments if you are doing so. *********************************************************

GSP 295 Week 5 iLab

For more classes visit www.snaptutorial.com GSP 295 Week 5 iLab *********************************************************

GSP 295 Week 6 iLab

For more classes visit

www.snaptutorial.com GSP 295 Week 6 iLab *********************************************************

GSP 295 Week 7 iLab

For more classes visit www.snaptutorial.com GSP 295 Week 7 iLab *********************************************************

GSP 295 Possible is Everything/snaptutorial.com

For more classes visit www.snaptutorial.com Deliverables A single zip file including the following: ·         Your Visual Studio Project di...

GSP 295 Possible is Everything/snaptutorial.com

For more classes visit www.snaptutorial.com Deliverables A single zip file including the following: ·         Your Visual Studio Project di...