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

  Design an object-oriented java application

You are to design an object-oriented Java application to let the user play a dice game that uses two dices. The player bets on a value and the dices roll

  Implement the basic properties of a bank account

Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the subsequent data:

  Create a book class for the library application project

Create a Book class for the Library application project. In addition to properties of author and isbn, with setters/getters, the Book should override Object's base method "boolean equals(Object)" and have a "boolean validate()" method.

  Prepare an app that calculates the product of a series

Prepare an app that calculates the product of a series of integers that are passed to method   product using a variable-length argument list.

  Program to translates a number into the closest letter grade

Write a program that translates a number into the closest letter grade. For example, the number 2.8 (which might have been the average of several grades) would be converted to B-. Break ties in favor of the better grade

  Write a fraction class called fraction.java

Write a Fraction class called Fraction.java that implements these methods: add - This method receives a Fraction parameter and adds the parameter fraction to the calling object fraction. multiply - This method receives a Fraction parameter and multip..

  Write thejava code for a program

Write theJava code for a program that reads the weight of a piece of luggage and print the proper message, depending on the weight, as per the table below.

  Code that sorts the household sizes in ascending order

The program should allow the user to enter each household size and determine the mean and median household size in Marengo. Need to write the code that sorts the household sizes in ascending order using a bubble sort.

  Explain the types of malware and the potential impact they

write a 200- to 300-word short-answer response to the following bull describe the types of malware and the potential

  Robot preparing for competition

Create an event so that the skateboard can be controlled by game player

  Design a program that does some polynomial operations

Implement polynomial addition by using an add() method, so you could write in program - Build a polynomial (linked list) from a file and the other from keyboard input (pairs of coefficients and powers) by a user.

  Write a java program that will play connect four

Write a java program that will play connect four - Must be a simple program no applets, jframes.

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