Tut_2 - the mid character in the string to a capital Z then...

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

View Full Document Right Arrow Icon
Programming and Data Structures Tutorial 2 1. Change the Maths class in which you developed during tutorial 1 so that it now belongs to a package called “MyMathsPackage”. 2. Now create a new project and test using your Maths package in a program. Don’t forget to import it first. 3. Write a program that will get a string from the user, calculate the mid character in the string, show it to the user and then change the string so that whatever the mid character may be in the string it now has been changed to a capital Z. If you are going to use the StringBuffer object to help you to change
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: the mid character in the string to a capital Z then the following method will allow you to change a character in the StringBuffer at a certain index position. setCharAt(indexPos, character); 4. Write a program that will get 2 strings from the user and then report back to the user if these strings are equal or not. Case matters. 5. Now write a program that given a string from the user will report back to the user how many Upper case characters are in the string. Remember that you can check a character at index position x by using the charAt(indexPos) method....
View Full Document

This note was uploaded on 05/25/2010 for the course CPE CPE 360 taught by Professor Jenniferchen during the Spring '10 term at Stevens.

Ask a homework question - tutors are online