Assignment1 Problems

Assignment1 Problems - 20 points 3) A string is a

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 Assignment #1 Due Date: Monday, January 26 at 11:59pm Submit: WebCT Late Policy: -1 point per minute late Instructions: This is an individual assignment. Answers should be your own work. Chapter 1 20 points 1) Prove by induction ( note: replace "sum" with the sigma summation symbol in the formula bel n n n sum (i*i*i) = ( sum i ) * ( sum i ) i=0 i=0 i=0 20 points 2) The count of vowels in a string could be found recursively by having each recursive call chec Write a class called Vowels having a recursive static method called "countVowels" to do this. Include a main method to demonstrate that your countVowels method works.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 20 points 3) A string is a "palindrome" if it reads the same forwards and backwards, such as the string "rac Write a class called Palindrome having a recursive static method called "checkString" to do th Include a main method to demonstrate that your checkString method works. 40 points 4) Write a generic class called Trio that has one type parameter. It contains three attributes (do Submit to WebCT. Problem1.xxx where xxx is txt, doc, docx, or pdf Vowels.java Palindrome.java Trio.java...
View Full Document

Ask a homework question - tutors are online