write a program to input a character (ch)convert the character into its opposite case. print the entered character in the new character the program should reject if the elector entered is not an alphabet A to z or a to z your program should continue as long as the user wants.
[tex]write \: in \: java [/tex]

Answers

Answer 1

Answer:

import java.util.Scanner;  

import java.lang.*;

class Main {

 public static void main(String[] args) {

   boolean exit = false;

   Scanner reader = new Scanner(System.in);

   while(!exit) {

     char c = '?';

     while( !Character.isLetter(c)) {

       System.out.print("Enter a letter or * to exit: ");

       c = reader.next().charAt(0);

       if (c == '*') {

         exit = true;

         break;

       }

       if (!Character.isLetter(c)) {

         System.out.printf("Error: %c is not a letter!\n", c);

       }

     }

     if (Character.isLowerCase(c)) {

       System.out.printf("%c in uppercase is %c\n", c, Character.toUpperCase(c));

     } else if (Character.isUpperCase(c)) {

       System.out.printf("%c in lowercase is %c\n", c, Character.toLowerCase(c));

     }

   }

   reader.close();

 }

}

Explanation:

I decided to use the asterisk (*) as exit character.


Related Questions

Which telecommunications service allow Internet and telephone service services to work over the same phone line

Answers

Answer:

VoIP

Explanation:

Voice over Internet Protocol

Answer:

DSL

Explanation:

I took the test and got it right.

At each step it should print out the move it makes and its performance score (e.g. S 0.2). Every 5 steps, it should print out a grid, with a "[ ]" on the square where the robot is now. Thus, with the above input, if the robot has done S U S L S, the output would be:

Answers

Answer:

The output would be S 0.2 U 0.2 S 0.2 U 0.2 L 0.2 S 0.2 [ ]

Explanation:

Given that at each step output prints for example S 0.2.

Also given after every 5 steps, it should print a grid "[ ]".

if robot has been given S U S L S, it prints output as

S 0.2 U 0.2 S 0.2 U 0.2 L 0.2 S 0.2 [ ]

Sean works for an organization that offers SaaS to a chain of boutiques.By getting data from the database,he has to prepare a list of instances when the billing transaction failed.Which of the following tasks does he need to do to prepare the report?
A) Create queries to get relevant data
B) Specify layout and format
C) Establish relationship between data
D) Add data to the report by running it

Answers

Answer: A) Create queries to get relevant data

B) Specify layout and format

D) Add data to the report by running it

Explanation:

SaaS is a software delivery method which allows the access of data from any device when there's a web browser and an internet connection and a web browser.

Since Sean wants to prepare a list of instances when the billing transaction failed, he'll need to:

• Create queries to get relevant data

• Specify layout and format

• Add data to the report by running.

Therefore, the correct options are A, B and D.

List 5 properties and metrics for specifying non-functional requirements.

Answers

Answer:

- performance

scalability

capacity

availability

reliability

which of the following resources type is mostly likely to be shared common resource in a computer network environment
a) printers
b) floppy disk drives
c) speakers
d) keyboards​

Answers

Answer:

A )Printer

Explanation:

In office multiple user can send request to print a doc......

In which SDLC step does the company translate broad, user-oriented systems requirements into the detailed specifications used to create a fully developed system

Answers

Answer:

Physical design.

Explanation:

Systems development life cycle (SDLC) is a strategic process that involves determining the overall system architecture, which is typically comprised of hardware, end users, physical processing components, software, and the communication channel that will effectively and efficiently satisfy the essential requirements of the system.

The system inputs and outputs is typically designed along with a plan of how the system's features will be navigated.

Basically, system design is divided into two (2) categories and these includes;

I. Logical design.

II. Physical design.

Furthermore, the design of service systems involves the process of planning, creating infrastructure, building communication, organizing staffs and standardization of a system so as to improve its quality and business relationships between the service provider and its clients.

In the physical design of systems development life cycle (SDLC), broad, user-oriented systems requirements are obtained from end users by companies and then translated into the detailed specifications that would be used to create a fully developed system.

Write a class called AddThreeGame that allows two players to play a game in which they alternately choose numbers from 1-9.

Answers

Answer:

Explanation:

The following code is written in Python, it creates the AddThreeGame as requested for 2 players. Outputting the desired output after each player has chosen a number and checking for a winner after every choice. Due to technical reasons, I had to add the code as a txt file below and the output can be seen in the attached picture.

6.What does transgenic mean?​

Answers

answer:

transgenic means that one or more DNA sequences from another species have been introduced by artificial means.

explanation:

transgenic plants can be made by introducing foreign DNA into a variety of different tissuestransgenic mice are one of the most common animal models used

relating to or denoting an organism that contains genetic material into which DNA from an unrelated organism has been artificially introduced. being or used to produce an organism or cell of one species into which one or more genes of another species have been incorporated a transgenic mouse transgenic crops and produced by or consisting of transgenic plants or animals.

What component can you use to open windows?

Answers

Answer:

Start Windows 10 Component Services via the Run dialog box. Press Win+ R keyboard shortcuts to launch Run dialog box, type dcomcnfg or dcomcnfg.exe in the box and click OK/press Enter to open Component Services.

Explanation:

(b) Write a program which displays the following pattern as an output.
*
**
***
****
*****
(Hint: using loop)

Answers

this is the answer for your question i´m guessing i hope this helped :)

******

Which programming paradigm does the programming language JavaScript follow?
A. procedural programming
B. object-oriented programming
C. functional programming
D. Imperative programming​

Answers

Its not functional programming (sorry)

Answer:

Object-oriented programming

Explanation:

Just took the test and got it right

Happy to help !!

Write a class Bug that models a bug moving along a horizontal line. The bug moves either to the right or left. Initially, the bug moves to the right, but it can turn to change its direction. In each move, its position changes by one unit in the current direction. Provide a constructor

Answers

Answer:

Following are the constructor to the given code:

Bug(int position) //defining a constructor that defines a integer parameters

{

       this.position = position;//use this key word to hold parameter value

       right = true;//defining a variable right that hold a boolean value

   }

Explanation:

In this code, a constructor is declared that defines integer parameters with it, Inside the constructor, this keyword is used to holds the "position" parameter value and defines a boolean variable "right" that holds a boolean value.

Full program:

public class Bug //declaring a class Bug

{

   private int position;//declaring integer variable position

   private boolean right;//declaring boolean variable

   public Bug(int position) //defining a parameterized constructor

   {

       this.position = position;//use this to hold position value

       right = true;//holding boolean value

   }

   public void turn() //defining a method turn

   {

       right = !right;//holding value

   }

   public void move() //defining method move

   {

       if(right)//use if to check boolean value

       {

           position++;//incrementing position value

       }  

       else//else block

       {

           position--;//decreasing position value

       }

   }

   public int getPosition()//defining method getPosition  

   {

       return position;//return position value

   }

   public static void main(String[] args) //main method

   {

       Bug bug = new Bug(10);//creating class object

       System.out.println("Expected = 10, Actual = " + bug.getPosition());//calling method with printing value

       bug.move();//calling method

       System.out.println("Expected = 11, Actual = " + bug.getPosition());//calling method with printing value

       bug.move();//calling method

       bug.move();//calling method

       bug.move();//calling method

       System.out.println("Expected = 14, Actual = " + bug.getPosition());//calling method with printing value

       bug.turn();//calling method

       bug.move();//calling method

       bug.move();//calling method

       System.out.println("Expected = 12, Actual = " + bug.getPosition());//calling method with printing value

       bug.turn();//calling method

       bug.move();//calling method

       System.out.println("Expected = 13, Actual = " + bug.getPosition());//calling method with printing value

   }

}

Output:

Please find the attached file.

What is the difference between autofocus and autocomplete

Answers

Answer:

https://www.c-sharpcorner.com/interview-question/explain-autofocus-and-autocomplete-attribute

found this on a website hope you find it useful !

Thomas owns a small Web services company and currently owns and maintains all his own computing hardware. He plans to develop and test a new service offering that will require his computing capacity to double or triple quickly if it proves successful. How might transitioning to the public cloud help Thomas with this situation

Answers

Answer: Hello the options related to your question is missing attached below are the options

answer : unlimited computing capacity for a low monthly fee ( A )

Explanation:

Since Thomas plans to develop a new service that will require his computing capacity to either double or triple, The best way of transitioning to the public cloud that might help Thomas meet up the requirement is Using unlimited computing capacity for a low monthly fee

What are two different ways by which a laptop could utilize the cellular network connection of a mobile device

Answers

Answer:

Tethering and hotspot

Explanation:

Tethering and hotspot are the two different ways by which a laptop could utilize the cellular network connection of a mobile device.

Tethering usually involves connecting the computer or smartphone to the internet with the aid of a USB cable while hotspot involves connection of the device to the internet through the WIFI option.

write a program to input 100 students marks and find the highest marks among the them​

Answers

Answer:

Explanation:

The following code is a Python program that allows you to input 100 marks. You can input the value -1 to exit the loop early. Once all the marks are entered the program prints out the highest mark among all of them. The output can be seen in the attached picture below with a test of a couple of marks.

marks = []

for x in range(100):

   mark = int(input("Enter a mark: "))

   if mark == -1:

       break

   else:

       marks.append(mark)

print("Max value: " + str(max(marks)))

Telephone – Cable/ Radio -​

Answers

Answer:

Telephone – Cable/ Radio -​ Wireless

Which measurement symbol is this?
PLS HELP

Answers

Answer:

Foot.

Explanation:

Hope this helps!

Which is the best definition of manageable?
A. asking for help from others
B. making a plan
C. breaking down a big goal into smaller pieces
D. creating multiple goals

Answers

Answer:

D. Creating mutiple goals.

Explanation:

In python, sorry if it’s blurry

Answers

Answer:

nice

Explanation:

lst = [[6,-3,8,0,5,-1,2,-2],[-7,4,3,-5,8,9,1,6]]

neg_values = 0

for x in lst:

   for y in x:

       if y<0:

           neg_values += 1

print(neg_values)

I wrote my code in python 3.8. I hope this helps

Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a double the volume of a pyramid with a rectangular base. calcPyramidVolume() calls the given calcBaseArea() method in the calculation.

Answers

Answer:

The method in C++ is as follows:

double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){

   double baseArea = calcBaseArea(baseLength, baseWidth);

   double volume = baseArea * pyramidHeight;

   return volume;    

}

Explanation:

This defines the calcPyramidVolume method

double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){

This calls the calcBaseArea method to calculate the base area of the pyramid

   double baseArea = calcBaseArea(baseLength, baseWidth);

This calculates the volume

   double volume = baseArea * pyramidHeight;

This returns the volume

   return volume;  

}

See attachment for complete program that include all methods that is required for the program to function.

g Why do database systems support concurrent execution of transactions, despite the extra effort needed to ensure that concurrent execution does not cause any problems

Answers

Answer:

Explanation:

To maintain data consistency and integrity in a large multi-user system, transactions are completed concurrently with the aid of concurrency management techniques.

The following are some of the benefits of concurrent transaction processing and execution versus serial transaction processing and/or execution:

Improved Resource Usage:

A transaction frequently combines both CPU and Input/output activities, resulting in better resource usage. Computers have the ability to run disks and CPUs in parallel. As a result, transactions can also be executed in parallel, with one employing the usage of the CPU and the other using the disk. As a result, resources are better used than in serial transaction processing and execution.

Improved throughput:

Running transactions in parallel has an immediate impact of increasing throughput since a greater number of transactions can be completed in the same period of time.

Lower/shorter waiting time:

Reduced wait time: When transactions are processed sequentially and serially, a short transaction is forced to wait for a longer transaction. Because transactions usually affect distinct portions of the database. As such, it's best if they happen at the same time i.e it is run concurrently.

The characteristics listed above are critical to a system's performance.

Thus, It is obvious that the benefits of concurrency exceed the extra programming work necessary to execute transactions concurrently. As a result, database systems must handle concurrent transactions despite the additional work necessary since it is worthwhile.

Write a function using a loop to approximate the value of PI using the formula given including terms up through 1/99, 1/999 and 1/9999. As the number of iterations increase, the estimate gets closer to the value of PI. The function should accept the number of iterations and return the estimate of PI.

Answers

Answer:

Following are the code to the given question:

#include <stdio.h>//header file

double estPi(int precision)//defining a method estPi that accepts value in parameter  

{

   double pi = 0, sign = 1, n = 1;//defining a double variable

   while (n <= precision) //use while loop that checks n value less than equal to precision

   {

       pi += sign / n;//defining pi variable that holds quotient value

       sign *= -1;//holding value in sign value

       n += 2;//increment value in n

   }

   return 4 * pi;//return value

}

int main() //main method

{

   int n;//defining an integer variable

   printf("Enter number of iterations: ");//print message

   scanf("%d", &n);//input value

   printf("Estimated PI is %lf\n", estPi(n));//print method that calls method

   return 0;

}

Output:

Please find the attached file.

Explanation:

In the given code a method "estPi" is declared that holds an integer variable "precision" is declared inside the method multiple double variable is declared inside the loop it calculate the value and return its values.

Inside the main method an integer variable "n" is declared that use print method to input the value and accepting value from the user-end and passing value in the method and print its values.

Answer:

Following are the code to the given question:

#include <stdio.h>//header file

double estPi(int precision)//defining a method estPi that accepts value in parameter  

{

  double pi = 0, sign = 1, n = 1;//defining a double variable

  while (n <= precision) //use while loop that checks n value less than equal to precision

  {

      pi += sign / n;//defining pi variable that holds quotient value

      sign *= -1;//holding value in sign value

     n += 2;//increment value in n

}

  return 4 * pi;//return value

}

int main() //main method

{

  int n;//defining an integer variable

  printf("Enter number of iterations: ");//print message

  scanf("%d", &n);//input value

  printf("Estimated PI is %lf\n", estPi(n));//print method that calls method

  return 0;

}

Output:

Please find the attached file.

In the given code a method "estPi" is declared that holds an integer variable "precision" is declared inside the method multiple double variable is declared inside the loop it calculate the value and return its values.

Inside the main method an integer variable "n" is declared that use print method to input the value and accepting value from the user-end and passing value in the method and print its values.

Answer: Following are the code to the given question: #include - 1

Explanation:

Find out the actual instruction given in binary

Answers

Your question is incomplete.

hope its helpful.

Sam plans to use this image in artwork for a brochure about airplanes. Which principles of page layout is Sam planning to use in this artwork?

A. emphasis
B. repetition
C. balance
D. alignment
E. proximity

Answers

Answer: Alignment

Explanation:

The principle of repitition indicates that some aspect of a design are repeated. This can be in form of bullet list, lines, color etc.

Balance has to do with how the weight is distributed.

The Principle of Alignment means that the pictures on a page should be connected visually to another thing.

Principle of Proximity simoly means that the items that are related on a page should be close to each other.

Therefore, the principles of page layout that Sam is planning to use in this artwork is alignment.

Answer:

D. alignment

Explanation:

Match each code snippet to its appropriate markup language name. XML CSS HTML XHTML


Answers

Answer:

Please find the complete solution in the attached file.

Explanation:

answer:

<p>line break</p><br/>  : XHTML

<Address>24, North Block</Address> : XML

<P>New paragraph</P> : HTML

<h2 style=“color:red;font-size:12px;”>Heading in red color.</h2> : CSS

just truuust

In this lab, you complete a C++ program that swaps values stored in three int variables and determines maximum and minimum values. The C++ file provided for this lab contains the necessary variable declarations, as well as the input and output statements. You want to end up with the smallest value stored in the variable named first and the largest value stored in the variable named third. You need to write the statements that compare the values and swap them if appropriate. Comments included in the code tell you where to write your statements.InstructionsEnsure the Swap.cpp file is open in your editor.Write the statements that test the first two integers, and swap them if necessary.Write the statements that test the second and third integer, and swap them if necessary.Write the statements that test the first and second integers again, and swap them if necessary.Execute the program by clicking the "Run Code" button at the bottom of the screen using the following sets of input values.101 22 -23630 1500 921 2 2Provided code:// Swap.cpp - This program determines the minimum and maximum of three values input by// the user and performs necessary swaps.// Input: Three int values.// Output: The numbers in numerical order.#include using namespace std;int main(){ // Declare variables int first = 0; // First number int second = 0; // Second number int third = 0; // Third number int temp; // Used to swap numbers const string SENTINEL = "done"; // Named constant for sentinel value string repeat; bool notDone = true; //loop control // Get user input cout << "Enter first number: "; cin >> first; cout << "Enter second number: "; cin >> second; cout << "Enter third number: "; cin >> third; while(notDone == true){ // Test to see if the first number is greater than the second number // Test to see if the second number is greater than the third number // Test to see if the first number is greater than the second number again // Print numbers in numerical order cout << "Smallest: " << first << endl; cout << "Next smallest: " << second << endl; cout << "Largest: " << third << endl; cout << "Enter any letter to continue or done to quit: "; cin >> repeat; if (repeat == SENTINEL){ notDone = false; } else { cout << "Enter first number: "; cin >> first; cout << "Enter second number: "; cin >> second; cout << "Enter third number: "; cin >> third; } return 0;} // End of main function

Answers

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

int main()//main method

{

int first = 0,second = 0,third = 0;//defining integer variable  

int temp; //defining integer variable

const string SENTINEL = "done"; // defining a string variable as constant  

string repeat;// defining a string variable  

bool notDone = true; //defining bool variable

cout << "Enter first number: ";//print message

cin >> first;//input value

cout << "Enter second number: ";//print message

cin >> second;//input value

cout << "Enter third number: ";//print message

cin >> third;//input value

while(notDone == true)//defining a loop to check the value  

{

if(first > second)//use if to compare first and second value

{

int temp = first;//defining temp to hold first value

first = second;//holding second value in first variable

second = temp;//holding temp value in second variable

}

if(second > third)//use if to compare second and third value

{

int temp = second;//defining temp to hold second value

second = third;//holding second value in third variable

third = temp;//holding temp value in third variable

}

cout << "Smallest: " << first << endl;//print smallest value

cout << "Next smallest: " << second << endl;//print Next smallest value

cout << "Largest: " << third << endl;////print Largest value

cout << "Enter any letter to continue or done to quit: ";//print message

cin >> repeat;//holding string value

if (repeat == SENTINEL)

{

notDone = false;//holding bool value

}  

else //else block

{

cout << "Enter first number: ";//print message

cin >> first;//input value

cout << "Enter second number: ";//print message

cin >> second;//input value

cout << "Enter third number: ";//print message

cin >> third;//input value

}

return 0;

}

}

Output:

Please find the attached file.

Explanation:

Inside the main method Four integer variable "first, second, third, and temp" is declared in which first three variable is used for input value and temp is used to compare value. In thew next step, two string variable "SENTINEL and repeat" is declared in which "SENTINEL" is constant and a bool variable "notDone" is declared. After input the value from the user-end a loop is declared that compare and swap value and print its value.

Which visualization is good to represent values that change with change in time?

Answers

Answer:

???

i would help but gotta explain more

Explanation:

Answer:

A box plot can be helpful when a distribution of values needs to be considered for each time period; each set of box and whiskers can show where the most common data values lie.

Explanation:

Write a program to sort the (name, age, score) tuples by descending order where name is string, age and score are numbers. The sort criteria is: 1: Sort based on name 2: Then sort based on age 3: Then sort by score The priority is that name < age < score. If the following tuples are given as input to the program: [('John', '20', '91'), ('Jason', '21', '85'), ('Jony', '17', '91'), ('Johny', '17', '93'), ('Tom', '19', '80')]\

Answers

Answer:

The program in Python is as follows:

from operator import itemgetter

m = int(input("Number of records: "))

print("Name, Age, Score")

my_list =[]

for i in range(m):

   user_details = input()

   my_list.append(tuple((user_details.split(","))))

my_list.sort(key =  itemgetter(0, 1, 2))        

print("Sorted: ", my_list)

Explanation:

This imports the operator function from itemgetter

from operator import itemgetter

This gets the number of records, m

m = int(input("Number of records: "))

This prints the format of input

print("Name, Age, Score")

This initializes the list of tuples

my_list =[]

This iterates through m

for i in range(m):

This gets the details of each person

   user_details = input()

This appends the details to the tuple

   my_list.append(tuple((user_details.split(","))))

This sorts the tuple

my_list.sort(key =  itemgetter(0, 1, 2))        

This prints the sorted tuple

print("Sorted: ", my_list)

what is software? what are two types of software?​

Answers

Software is the programs and other operating information used by a computer. Two types of software are system software and Application software. Hope this helps :)

Answer:

Software is the collection of programs which makes computer work. The two types of software are 1)Application software

2)System software

Other Questions
Can someone help me answering this question PPLZZ NEED HELP END OF A SCHOOL TEST PPLLLZZ AND NO WEBSITE THAT HAS THE ANSWER mai's brother tell her that 10/7 is equal to square root of 2.mai know this cant be right,because 10/7 is rational and square root of 2 is irrational.writ an explanation that mai can use to convince her brother that 10/7 cannot be the square root of 2 Student D had to write a persuasive essay about the solar system. Which of the following is an example of a claim the student might make? Select one:The U.S. government spent money on its aerospace program.Jupiter is a planet in our solar system.Humans have explored the outer space in our past.It is important for humans to explore outer space. Can someone help? thank you a 1lb box costs .50 to mail through the postal service. a 3lb box cost .92 to mail through the postal service. the postal services calculates the weight to the whole pound. what functions represent the total cost f(x), to send a letter that is x pounds? select all that apply.A- f(x)=0.21(x-1)+0.50B- f(x)=0.50(x-1)+0.21C- f(x)=0.50xD- f(x)=0.21x+0.29E- f(x)=0.21x or slip between the ridges meaning should other people opinions affect our own choices or destinies ? ( 8 - 10 sentences explaining why or why not ) pls help me w this! the answer must be 8-10 sentences. You are given a clear-water solution containing potassium nitrate. How could you determine whether the solution is unsaturated, saturated, or supersaturated? CAN SOMEONE HELP ME WITH THE ONE THAT SAYS 5 PLSS hey! ill give brainliest please help Which line has a slope of 1, and which has a slope of 2?Use a ruler to help you graph a line whose slope is 1/3 . Label this line a . Question 33 ptLong wave radiation has...low energyhigh energymedium energyno energy Simplify for ez quick points! Which ordered pair belongs to the function shown by this mapping diagram? A poll states that Hillary Clinton will receive 43 percent of the vote. There is an 8 percent margin of error. What do you think of the poll this is 6th grade writing please help I don't understand 5 and 4 but mostly 5 Write an equation of the line with a slope of 5/2 and a y intercept of 1 A group of similar organisms that can meet with each other in produce fertile offspring is a Mariannas company received 1,240 orders for her handmade gift baskets. If her company can complete 98 orders in a day, how many days will it take to complete all of the orders? At noon, ship A is 140 km west of ship B. Ship A is sailing east at 30 km/h and ship B is sailing north at 25 km/h. How fast (in km/hr) is the distance between the ships changing at 4:00 p.m.