Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java and the Please choose from one of the following options list is to be included in the program as an immediate selection for

In Java and the Please choose from one of the following options list is to be included in the program as an immediate selection for a user. image text in transcribed
Please choose from one of the following options: 1. Convert to all uppercase 2. Convert to all lowercase 3. Show the number of characters 4. Show the 12th character All input and output for this program should be done through the use of graphical dialog boxes as discussed in class (i.e. JOptionPane). Instructions: 1. Create a second class named StringManipulator. This class should have one member variable to hold the text that is entered by the user. You will need to create get and set methods for the input member variable. You will also need to create an empty constructor that will initialize the value of the input String to an empty. You will also need to create four public methods in the StringManipulator class. One method will return the input string converted to all uppercase, the second will return the input string converted to all lowercase, the third will return the number of characters in the input string and the last will return the 12th character in the input string if it exists (if it does not exist, the method should return an error message). The methods should be formed as follows: 2. a. convertToUppercase()-no arguments and returns a String value b. convertToLowercase() - no arguments and returns a String value c. getNumCharacters() - no arguments and returns an int value d. lastMethod) (choose a good name)-no arguments and returns a String value 3. In the Main class, create a variable of type StringManipulator that you created in the previous step. Use an Input dialog box to prompt the user for a string value, store that value in the StringManipulator variable you just created, and then call a separate method to display the menu above in a Message dialog box. 4 After hz user makes a setection you well catl another method that wit use a switch shatement to chick the valns of yle munu entny made by he user and then use he shingman pwntor that you Created earier i J dptanPane,ts report to er he infe regeste

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 2012 Proceedings Part 2 Lnai 7197

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284892, 978-3642284892

More Books

Students also viewed these Databases questions

Question

Are the short-term results outweighed by a long-term backlash?

Answered: 1 week ago