EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
9th Edition
ISBN: 9781337671385
Author: FARRELL
Publisher: CENGAGE LEARNING - CONSIGNMENT
bartleby

Videos

Expert Solution & Answer
Book Icon
Chapter 7, Problem 1PE

Explanation of Solution

Program:

File name: “InputCharacterInfo.java

//Import necessary header files

import java.util.Scanner;

//Define a class named InputCharacterInfo

public class InputCharacterInfo

{

    //Define main method

    public static void main(String[] args)

    {

        //Create an object to the Scanner class

        Scanner sc = new Scanner(System.in);

        //Prompt the user to enter a character

        System.out.println("Enter char: ");

        char aChar = sc.nextLine().charAt(0);

        //Tests if character is uppercase

        if (Character.isUpperCase(aChar))

        {

            //Print the result

            System.out.println(aChar + " is uppercase");

        }

        //Else condition

        else

        {

            //Print the result

            System.out.println(aChar + " is not uppercase");

        }

        //Tests if character is lowercase

        if (Character.isLowerCase(aChar))

        {

            //Print the result

            System.out.println(aChar + " is lowercase");

        }

        //Else condition

        else

        {

            //Print the result

            System.out.println(aChar + " is not lowercase");

        }

        //Returns the uppercase equivalent of the character

        aChar = Character...

Blurred answer
Students have asked these similar questions
Modify the CharacterInfo class shown and included in the code editor to the right so that the tested character is retrieved from user input. An example of the program is shown below: Enter a character... R The character is R R is uppercase R is not lowercase After toLowerCase(), aChar is r After toUpperCase(), aChar is R R is a letter or digit R is not whitespace info> Do not edit the output statements.   Task 01: Create the InputCharacterInfo class. Task 02: The InputCharacterInfo program displays the correct information for the input character.
File names: color_square.py, chessboard.py, test_squares.py Positions on a chess board are identified by a letter and a number. The letter identifies the column; the number identifies the row. See the image below.   You will provide the functions that allow us to determine: if a chessboard square is either black or white, given its coordinates. If the row/column is valid or not for the standard chessboard For example, if we pass in “d” for the column and 4 for the row, your function that determines color should return the string: “BLACK”. If we pass  in "k" for the column to your function that validates columns, that function should return the boolean False. Requirements: Your function for validating the column should be able to accept upper or lowercase strings as parameters. Your functions for validating the row should be able to accept integers or strings as parameters. Your function that determines black-or-white may assume that the input has been validated prior to us calling…
Output seen please to code asap.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k;License: Standard YouTube License, CC-BY
file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA;License: Standard Youtube License