Write a method public static char touppercase(char ch)

Assignment Help JAVA Programming
Reference no: EM13942381

1. Write a program in which the main method calls a method with the heading public static char changeCase(char ch) that if ch is a lowercase letter, the method will return the corresponding uppercase letter, and if ch is a uppercase letter, the method will return the corresponding lowercase letter. If ch is not a letter, the method returns the same value of ch. Thus, for instance, changeCase('a') returns A, changeCase('B') returns b, and changeCase('3') returns 3. Note that the uppercase letters have a unicode (ascii code) value that is 32 lower than the corresponding lowercase ones.

Your main method should contain three calls to changeCase() for each case mentioned above.

2. Write a method public static char toUpperCase(char ch) that if ch is a lowercase letter, the method will return the corresponding uppercase letter, and if ch is any other character, it will return that character. Read a string consisting of "My country tis of thee, Sweet land of liberty, Of thee I sing" and using toUpperCase() in a loop, convert the entire string to uppercase letters, where the string is assigned to the variable s.

Reference no: EM13942381

Questions Cloud

What are some of the challenges marketers must consider : What are some of the challenges marketers must consider when designing their pricing strategies?
What is causing hals cash flow problems : Hal Carrier, of Bulltuff Stock Trailers, Inc., has asked you for help. In the last four months, he has had several checks written to suppliers that were refused by his bank because of nonsufficient funds. Now his main supplier, Alcoa Aluminum Supp..
Determine the total power dissipated from the disks : The paint on the rotating disk is worn off by dust in the air, exposing the base metal, which has an emissivity of s = 0.10. Determine the total power dissipated from the disks worn top surface.
United states has a consistent : If the United States has a consistent trade deficit with another country.
Write a method public static char touppercase(char ch) : Your main method should contain three calls to changeCase() for each case mentioned above.
Dialogue between two artists : Create a dialogue between two artists discussing their work(s) with an interviewer asking questions in front of an audience at an art gallery (much like a panel discussion format).
The purchase price of a loader including tires : The purchase price of a loader including tires, sales tax, and all other costs associated with its purchase is $210,000. The life of the loader is 9years, at which time it will have an estimated salvage value of $23,000. The replacement cost of the t..
What type of sentence is the following : What type of sentence is the following? (End punctuation has been omitted.) Mr. Rodman asked if anyone else was interested in tickets for the afternoon sports event
What are value-returning methods : The methods must include: one value-returning method and one void method which will receive a formal parameter and one (each) that will not. Your program must compile and run.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Calculates the product of the following sequence

Write a java code that calculates the product of the following sequence of numbers using for/loop and do/while/loop

  The fileiohelper class provides 2 class methods

1.int FileIOHelper.getNumberofStudents(String fileName): takes a String parameter which is the name of an input file in the format described above, and returns the number of students in the file

  Modify your server to make it multithreaded your server

modify your server to make it multithreaded. your server should allow more than one client to connect and request

  Program that allows two players to play tic-tac-toe

Implement a program that allows two players to play tic-tac-toe. Draw the game grid and an indication of whose turn it is (X or O). Upon the next click, check that the mouse click falls into an empty location,

  Calculate the total withholding

Calculate dependent deductions at 2.0% of the employee's salary for each dependent.

  What are the limits for each one of these indexes

What are the limits for each one of these indexes and is it possible to model a 2-dimensional array with a single-dimensional array?

  Create a panel with borderlayout

Create a panel with BorderLayout. Add a button labeled "OK" to the south side of the panel - given the program, show the values of the array

  Classes and pointers experience using dynamic memory

To practice defining classes using separate compilation using classes, vectors, and pointers experience using dynamic memory.

  Project detailsyou will explore basic socket programming

project detailsyou will explore basic socket programming threading and gui design using javas network library threading

  Create a deque class based on the discussion of deques

Create a Deque class based on the discussion of deques (double-ended queues) in this chapter. It should include insertLeft(), insertRight(), removeLeft(), removeRight(), isEmpty(), and isFull() methods.

  Creates a file called "grades.txt" with 1000 lines

Write a program that creates a file called "grades.txt" with 1000 lines. Each line in the "grades.txt" file will consist of a student's first name, last name, graduating year(2013,2014,2015), and grade. the student's first name and last name for t..

  Packer logo method

Being a super Packer fan's wife, this assignment involves the use of the Green Bay Packer logo. Any die-hard Minnesota fans are welcome to use the Viking's logo instead.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd