Write a program to compute answers to some basic geometry formulas. The program prompts the user to input a length (in centimeters) specified as a floating point value. The program then echoes the input and computes areas of squares and circles and the volume of a cube. For the squares, you will assume that the input length value is the length of a side. For the circles, this same value becomes the diameter. Use the meter value input to calculate the results in square (or cubic) meters and then print the answers in square (or cubic) meters.

Answers

Answer 1

Answer:

import math

l = float(input("Enter length in cm: "))

l = l / 100;

print("Entered length is " + str(l) + " meters")

area_square = l * l

print("Area of square is " + str(area_square))

area_circle =  math.pi * l/2 * l/2

print("Area of circle is " + str(area_circle))

volume_cube =  l * l * l

print("Volume of cube is " + str(volume_cube))

Explanation:

*The code is in Python

Ask the user to enter the length in cm

Convert the length to meters and print it

Calculate the area of the square and print it (Since length is equal to a side, the area is length * length)

Calculate the area of the circle and print it (Since length is equal to the diameter, you need to divide it by two to get the radius. The area is pi * length/2 * length/2)

Calculate the volume of the cube and print it (Since length is equal to a side, the volume is length * length * length)


Related Questions

C++ code pls write the code

Answers

Answer:

Following are the code to this question:

#include<iostream>//defining header file

using namespace std;

class vec//defining class vec  

{

int x, y, z; //defining integer varaible x, y, z

public: // using public access specifier

vec() //defining default constructor

{

   x = 0; //assign value 0 in x variable  

   y = 0; //assign value 0 in y variable

   z = 0;//assign value 0 in z variable

}

vec(int a, int b , int c) //defining parameterized constructor vec

{

   x = a; //assign value a in x variable

   y = b; //assign value b in y variable

   z = c;//assign value c in z variable

}

void printVec() //defining a method printVec

{

   cout<<x<<","<<y<<","<<z<<endl; //use print method to print integer variable value

}

//code

vec& operator=(const vec& ob) //defining operator method that create object "ob" in parameter  

{

x=ob.x; //use ob to hold x variable value

y=ob.y;//use ob to hold y variable value

z=ob.z;//use ob to hold z variable value

return *this;//using this keyword to return value  

}

};

int main()//defining main method

{

vec v(1,2,3);//calling parameterized constructor

vec v2; //creating class object to call method

v2=v; //creatring reference of object

v2.printVec(); //call method printVec

return 0;

}

Output:

1, 2, 3

Explanation:

In the above-given code part, a method "operator" is defined, that accepts an object or we can say that it is a reference of the class "ob", which is a constant type. Inside the method, the object is used to store the integer variable value in its variable and use the return keyword with this point keyword to return its value.    

Write a program that prompts the user to input an integer that represents the money in cents. The program will the calculate the smallest combination of coins that the user has. For example, 42 cents is 1 quarter, 1 dime, 1 nickel, and 2 pennies. Similarly, 49 cents is 1 quarter, 2 dimes, and 4 pennies

Answers

Answer:

The program in Python is as follows:

cents = int(input("Cent: "))

quarter = int(cents/25)

if quarter > 1:

     print(str(quarter)+" quarters")

elif quarter == 1:

     print(str(quarter)+" quarter")

cents = cents - quarter * 25

dime = int(cents/10)

if dime>1:

     print(str(dime)+" dimes")

elif dime == 1:

     print(str(dime)+" dime")

cents = cents - dime * 10

nickel = int(cents/5)

if nickel > 1:

     print(str(nickel)+" nickels")

elif nickel == 1:

     print(str(nickel)+" nickel")

penny = cents - nickel * 5

if penny > 1:

     print(str(penny)+" pennies")

elif penny == 1:

     print(str(penny)+" penny")

Explanation:

This line prompts user for input in cents

cents = int(input("Cent: "))

This line calculates the number of quarters in the input amount

quarter = int(cents/25)

This following if statement prints the calculated quarters

if quarter > 1:

     print(str(quarter)+" quarters")

elif quarter == 1:

     print(str(quarter)+" quarter")

cents = cents - quarter * 25

This line calculates the number of dime in the input amount

dime = int(cents/10)

This following if statement prints the calculated dime

if dime>1:

     print(str(dime)+" dimes")

elif dime == 1:

     print(str(dime)+" dime")

cents = cents - dime * 10

This line calculates the number of nickels in the input amount

nickel = int(cents/5)

This following if statement prints the calculated nickels

if nickel > 1:

     print(str(nickel)+" nickels")

elif nickel == 1:

     print(str(nickel)+" nickel")

This line calculates the number of pennies in the input amount

penny = cents - nickel * 5

This following if statement prints the calculated pennies

if penny > 1:

     print(str(penny)+" pennies")

elif penny == 1:

     print(str(penny)+" penny")

Which of the following is NOT an advantage to using inheritance?
a. Code that is shared between classes needs to be written only once.
b. Similar classes can be made to behave consistently.
c. Enhancements to a base class will automatically be applied to derived classes.
d. One big superclass can be used instead of many little classes.

Answers

Answer:

D)One big superclass can be used instead of many little classes.

Explanation:

Inheritance could be described as getting new class on another existing class with almost same execution,

inheritance allows codes to be re-used. It should be noted that inheritance bring about the code sharing among class.

The advantages of using inheritance includes but not limited to

✓ Code that is shared between classes needs to be written only once.

✓Similar classes can be made to behave consistently.

✓ Enhancements to a base class will automatically be applied to derived classes.

A major disadvantage of inheritance is that child/children classes depends on parent class, hence a change in the parent class will affect the child class, therefore option C is the correction option.

Inheritance is a type of programming concept where by a class (Child) can inheritance methods, properties of another class (Parent).

Inheritance allows us to reuse of code, one advantage of Inheritance is that the code that is already present in base class need not be rewritten in the child class.  

The different types of Inheritance are:

Single Inheritance.Multiple Inheritance.Multi-Level Inheritance.Hierarchical Inheritance.Hybrid Inheritance.

Learn more:

https://brainly.com/question/4560494

System Development Life Cycle (SDLC) defines methodology with clearly defined process of development of a system comprising of six stages including plan, analyze, design, develop, implement and maintain. A similar system was utilized when a university implemented Learning Management System in order to incorporate online learning and student facilitation portal. You are now assigned to investigate the issues faced by the students while shifting from physical learning environment to online learning environment. After investigation, develop a feasibility report to recommend what common problems will be faced by the students when shifted to new online environment?

Answers

Answer:

The answer is "The problems which students face when they have been transferred to the online environment are the popular ones".

Explanation:

Digital Literacy:

It was the first issue that can occur whenever the student shifts from either a physical to an online course. When a participant wants to get involved in the on-line class, he/she must be able to use various tools in an on-line setting-login or update and delete successfully, enroll in an online class, submit assignments on-line or communicate to professors as well as other participants in the lesson.  

Technical issues:

In colleges, students and teachers of new on-line educational systems will present many technical issues. These problems could include slow internet bandwidth and just a little time to find a more suitable Wi-Fi location to access the web.

Timing issues:

It is scheduling for learners could be of interest in which a prescribed period for performing online courses also isn't followed. Teachers might well be distracted only at school with the other family or work. Sometimes educators could also engage in many other tâches only at the prescribed time, such that he needs can inform his learners about the lesson earlier is however also an important issue while shifting to online courses.

Motivation:

Online teaching involves motivation for completion of tasks, activity, and progress. So, if students or educators weren’t motivated to be using the new system, this can be a big problem.

Answer:

The problems which students face when they have been transferred to the online environment are the popular ones

Explanation:

What are the differences between an Api Controller and "regular/view" Controller in .Net?

Answers

Answer:

An API controller in .Net is a code statement or function that returns data and a RESTful API to the application while a regular or view controller is a class that returns a view.

Explanation:

The .Net framework is a platform used for creating user-friendly and user interactive interfaces in desktop and web applications. Like all programming frameworks, it uses API and API controllers to source data and other properties.

How does the new digital image compare to the one from Challenge A? What effect did taking a larger number of samples have on the image?

Answers

Answer:

their is no image

Explanation:

diagonal pliers are best for?​

Answers

They’re best for “cutting wire and small pins in areas that cannot be reached by larger cutting tools.”

Diagonal pliers are best for removing stapels

Create a datafile called superheroes.dat using any text-based editor, and enter at least three records storing superheroes’ names and main superpower. Make sure that each field in the record is separated by a space.

Answers

Answer:

Open a text-based editor like Microsoft word, notepad, libraoffice, etc, type the name of the super hero on the first field and the main power on the second field. Then click on the file menu or press ctrl-s and save file as superheroes.dat.

Explanation:

The file extension 'dat' is used to hold data for programs, for easy access. The file above holds data in fields separated by a space and has multiple records.

What code would you use to tell if "schwifty" is of type String?
a. "schwifty".getClass().getSimpleName() == "String"
"b. schwifty".getType().equals("String")
c. "schwifty".getType() == String
d. "schwifty" instanceof String

Answers

Answer:

d. "schwifty" instanceof String

Explanation:

Given

List of options

Required

Determine which answers the question.

The syntax to check an object type in Java is:

[variable/value] instanceof [variable-type]

Comparing this syntax to the list of options;

Option d. "schwifty" instanceof String matches the syntax

Hence;

Option d answers the question

A computer processor stores numbers using a base of: _____.a) 2b) 10c) 8d) 16

Answers

It stores a base of 16

A computer processor stores numbers using a base of 16. The correct option is d).

What is a computer processor?

A computer processor is a computer processing unit that is a CPU. CPU controls all the functions of the computer. It stores memory, and it has two types of memory. Short-term and long-term. It executes all the instructions given to the computer.

The design expert discusses the project three-dimensionally at this point in the process. To define the character of the finished project and an ideal fulfillment of the project program, a variety of potential design concepts are investigated.

The different kinds of computer processors are: microprocessor, microcontroller, embedded processor, digital signal processor

Therefore, the correct option is d). 16.

To learn more about computer processors, refer to the link:

https://brainly.com/question/15102947

#SPJ5

Which of these is NOT a desktop computer operating system?

iOS

Linux

macOS

Windows

Answers

Answer:

IOS

Explanation:

IOS is used for mobile devices

IOS is not a desktop computer operating system. The correct option is A.

What is an operating system?

A computer's operating system is a piece of software that enables users to run other programs on the system. Almost all programs are created to operate on an operating system in order to be independent of the hardware design and are not typically intended to communicate directly with the hardware.

The main function of an operating system are:

Control the central processing unit, memory, disk drives, and printers of a computer.Create a user interface to make human-computer interaction easier.Run software programs and offer related services.

Apple Inc. conceived and developed the mobile operating system known as iOS specifically for its hardware. Many of the company's mobile devices, notably the iPhone, run on this operating system.

Therefore, IOS is a mobile operating system.

To know more about an operating system follow

https://brainly.com/question/22811693

#SPJ2

Recursion is a natural use for a _____ (stack or queue)

Answers

Answer:

Stack

Explanation:

Any function that call itself can be regarded as recursive function, it should be noted that Recursion is a natural use for a stack, especially in the area of book keeping.

Recursion is very important because some of problems are usually recursive in nature such as Graph and others, and when dealing with recursion , only base and recursive case is needed to be defined.

Some areas where recursion is used are in sorting and searching.

10010010 + 01100010 =

The problem above is called an _________. It means that there are more ________ than can be stored in a byte, or eight bit number.

Answers

Answer:

1. binary number or 8 bit

2. bits

Explanation:

Write a program that simulates a lottery. The program should havean array of five integers named lottery, and shouldgenerate a random number in the range of 0 through 9 for eachelement in the array. The user should enter five digits whichshould be stored in an integer array named user. Theprogram is to compare the corresponding elements in the two arraysand keep a count of the digits that match. For example, thefollowing shows the lottery array and the user array with samplenumbers stored in each. There are two matching digits (elements 2and 4).
lottery array: 7,4,9,1,3
user array: 4,2,9,7,3
The program should display the random numbers stored in the lotteryarray and the number of matching digits. If all the digits match,display a message proclaiming the user as a grand prize winner.

Answers

Answer:

Here is the C++ program that simulates lottery:

#include<iostream>  //to use input output functions

using namespace std;  //to access objects cin cout

int main(){  //start of main function

int size= 5; // size of arrays

int range = 10;  //range of random numbers from 0 to 9

int user[size];  // user array

int lottery[size];  // lottery array

for(int i=0;i<size;i++)  //iterates through the array

lottery[i]=rand()%range;  // generates random number in specified range

cout<<"Enter "<<size<<" digits: ";  //prompts user to enter 5 digits

for(int i=0;i<size;i++)  //loops through the user array

cin>>user[i];  //reads input digits from user

int match=0;  //stores number of matching digits

for(int i=0;i<size;i++)  //iterates through array to compare user and lottery arrays

if(user[i]==lottery[i])  //if digit at i-th index of user array matches to that of lottery array

match++;  //increments count of matching digits by 1

cout<<"Lottery array: ";  // display digits of lottery array

for(int i=0;i<size;i++)  //iterates through elements of lottery array

cout<<lottery[i]<<" ";  //prints elements of lottery array with a space between them

cout<<endl;  //prints a new line

cout<<"  User  array: ";  // prints digits of user array

for(int i=0;i<size;i++) //iterates through elements of user array

cout<<user[i]<<" ";  //prints elements of user array

cout<<endl;  // prints a new line

if(match==size){  //if all the digits match

cout<<"Congratulations. You are a grand prize winner! "; }//displays this message proclaiming the user as a grand prize winner

else{  // if all digits of user array do not match with lottery array digits

cout<<"Number of digits matched: "<<match<<endl; //displays the number of matched digits

cout<<"Sorry! Better luck next time!" ;    //displays this message when all digits don't match

}

}    

Explanation:

If you want to keep the size and range fixed then you can use #define before the main() function to give a constant value to size and range as:

#define size 5

#define range 10

The program uses rand() function in order to generate random numbers for lottery array in the range of 0 through 9.

Then the program declares a user array with size = 5 and prompts user to enter 5 digits to stores in user array.

Next the program matches each digit of user array to the corresponding digit of lottery array and if the two digits match then the program increments the match variable by 1 to count the matched digits. For example, lets say lottery has the following elements:

lottery: 7,4,9,1,3

Lets say user array has following elements input by user at console

user: 4,2,9,7,3

Now at first iteration the digit 7 at 0-th index of lottery array is matched to the digit 4 at 0-th index of user array. This index is specified using variable i. These means the first element of lottery array is matched with first element of user array. As these digits are not equal so they don't match and the variable i is incremented to point to the position of next digit.

Now at second iteration the digit 4 in lottery array is matched to the digit 2 of user array. As these digits are not equal so they don't match and the variable i is incremented.

at third iteration the digit 9 in lottery array is matched to the digit 9 of user array. As these digits equal so they match and the variable match is incremented to 1 in order to count the number of matches. So value of match = 1

Now at fourth iteration the digit 1 in lottery array is matched to the digit 7 of user array. As these digits are not equal so they don't match and the variable i is incremented. The value of match also remains the same i.e. 1

at fifth iteration the digit 3 in lottery array is matched to the digit 3 of user array. As these digits equal so they match and the variable match is incremented to 1 in order to count the number of matches. So value of match = 2

Next the loop ends because the value of exceeds 5 which is the size of the array.

Next if(match==size) statement has an if condition which checks if all digits match. This is checked by comparing the count of match variable to the size of the array. The value of match is 2 and value of size is 5 so this means that all the digits do not match. Hence this condition evaluates to false. So the statement in if part will not execute and program moves to the statement: cout<<"Number of digits matched: "<<match<<endl; which displays the value of match variable i.e. 2 as:

Number of digits matched: 2

followed by statement cout<<"Sorry! Better luck next time!" ;  which displays the message:

Sorry! Better luck next time!

Does the submission include the file "SuperPower.java"? Does the file include a public class called "SuperPower"? Does the class include a public method called "main"? Is the "main" method static? Does the main method have a String assignment statement that uses "JOptionPane.showInputDialog"? Does the main method have a statement that uses "JOptionPane.showMessageDialog"? Does the program convert the String from "JOptionPane.showInputDialog" using the "toUpperCase" method? Does the submission include a screenshot that shows an Input dialog that asks, "What is your superpower?" Does the submission include a screenshot that shows a Message dialog stating " TO THE RESCUE!", where "" is the input converted to upper case?

Answers

Answer:    

Here is the program fulfilling all the requirements given:

import javax.swing.JOptionPane;      

public class SuperPower{

public static void main(String[] args) {

String power;

power = JOptionPane.showInputDialog("What is your super power?");

power = power.toUpperCase();

JOptionPane.showMessageDialog(null, power);} }

Explanation:

Does the file include a public class called "SuperPower"

See the statement:

public class SuperPower

Does the class include a public method called "main"? Is the "main" method static?

See the statement:

public static void main(String[] args)

Does the main method have a String assignment statement that uses "JOptionPane.showInputDialog"

See the statement:

power = JOptionPane.showInputDialog("What is your super power?");

Does the main method have a statement that uses "JOptionPane.showMessageDialog"?

See the statement:

JOptionPane.showMessageDialog(null, power);

Does the program convert the String from "JOptionPane.showInputDialog" using the "toUpperCase" method?

See the statement:

power = power.toUpperCase();

Does the submission include a screenshot that shows an Input dialog that asks, "What is your superpower?" Does the submission include a screenshot that shows a Message dialog stating " TO THE RESCUE!", where "" is the input converted to upper case?

See the attached screenshots

If the program does not let you enter an exclamation mark after "to the rescue" then you can alter the code as follows:

import javax.swing.JOptionPane;

public class SuperPower{

public static void main(String[] args) {

String power;

power = JOptionPane.showInputDialog("What is your super power?");

power = power.toUpperCase();

JOptionPane.showMessageDialog( null, power+"!");} } // here just add an exclamation mark which will add ! after the string stored in  power

Where is the video card located in a computer?

Answers

Video card??????????
pretty sure it’s in the motherboard?

Which of the following Office Online apps is most effective for creating multimedia presentations?

Answers

Answer:

Powerpoint Online

Explanation:

Powerpoint is used to create presentations.

Select one
True
False
Fin
When you insert a tall, PowerPoint assumes you want this custom background on only the current slide displayed
To make this background appear on all slides in the presentation, click the Apply to button in the Format
Background dialog box
Select one

Answers

Answer:

True

Explanation:

Write a Java program that prompts the user for an int n. You can assume that 1 ≤ n ≤ 9. Your program should use embedded for loops that produce the following output: 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1 . . . n . . . 5 4 3 2 1 Your prompt to the user should be: Please enter a number 1...9 : Please note that your class should be named PatternTwo.

Answers

Answer:

Here is the JAVA program:

import java.util.Scanner;  // to take input from user

public class PatternTwo{   //class name

public static void main(String args[]){  //start of main function

Scanner scan = new Scanner(System.in);   // creates Scanner class object

System.out.print("Please enter a number: ");  //prompts user to enter an int n for the number of rows

int n = scan.nextInt();   //reads and scans the value of n from user

int i, j;   //declares two variables to iterate through i  rows and j columns

for (i=1; i<=n; i++){    //outer loop for rows  

for (j=2*(n-i); j>=1; j--){   //inner loop for space between numbers in pattern  

System.out.print(" ");  }   //displays an empty space in the pattern

for (j = i; j >= 1; j--)  { //inner loop for columns  

System.out.print(j+" "); }   //prints the value of j (prints numbers in reverse)

System.out.println();   }   }   }  //prints a new line after printing each row

Explanation:

The program is explained with an example in the attached document.

Which device listed below is NOT a storage device?
ROM
RAM
SSD
Removable FLASH drive

Answers

ssd is not a storage device
Answer: RAM

Explanation: RAM is the temporary memory for the motherboard. It is not used to store your favorite games, music, and documents.

19 POINTS! What does the icon for changing the color of a cell or range look like? (Excel)


a pencil


the letter A


a paint bucket


a paintbrush

Answers

Answer:

Paintbucket

Explanation:

I got it right

Answer:

A Paint Bucket

Explanation:

Imagine you were using some of our pixelation tools to create an image and you posted it online for your friends to see - but, a week later you find out someone took that image and put it on a T-shirt that they’re selling for $10 each.


Now that we understand Copyright, what would need to change in order for the scenario from the warm-up to be okay?

Answers

Answer:

I will develop a CREATIVE COMMONS LICENSE

Explanation:

Based on the scenario given what i would need to change for the scenario from the warm-up to be okay is for me develop CREATIVE COMMONS LICENSE and the reason why I would develop this type of license is that it will enable people or the public to freely make use of my work or have free licence to the work that I have created by freely using it on their own products which will enables them to sell their work which have my own work on them easily and freely without any form of restrictions.

Copyright allows the creator or owner of a property (usually intellectual property) to have an absolute right over his property.

What needs to be done in this scenario is to create a creative common license.

In copyright, creative common license allows the members of the public to make use of an intellectual property for free, while the owner still retains the ownership and right, over the property.

When the creative common license is done, the seller of the T-shirt can sell the T-shirt without remitting any incentive to you; however, the seller gives you credit and recognition for the image.

Read more about copyrights at:

https://brainly.com/question/17357239

Your network administrator finds a virus in the network software. Fortunately, she was able to eliminate it before it resulted in a denial-of-service attack, which would have prevented legitimate users of the networked database from gaining access to the records needed. It turns out that the network software did not have adequate security protections in place. The fact that this virus was successfully inserted into the network software points to a ______ the network software.

Answers

Answer:

Vulnerability of.

Explanation:

In this scenario, your network administrator finds a virus in the network software. Fortunately, she was able to eliminate it before it resulted in a denial-of-service attack, which would have prevented legitimate users of the networked database from gaining access to the records needed. It turns out that the network software did not have adequate security protections in place. The fact that this virus was successfully inserted into the network software points to a vulnerability of the network software.

In Cybersecurity, vulnerability can be defined as any weakness, flaw or defect found in a software application or network and are exploitable by an attacker or hacker to gain an unauthorized access or privileges to sensitive data in a computer system.

This ultimately implies that, vulnerability in a network avail attackers or any threat agent the opportunity to leverage on the flaws, errors, weaknesses or defects found in order to compromise the security of the network.

Some of the ways to prevent vulnerability in a network are;

1. Ensure you use a very strong password with complexity through the use of alphanumerics.

2. You should use a two-way authentication service.

3. You should use encrypting software applications or services.

Write a program that produces a Caesar cipher of a given message string. A Caesar cipher is formed by rotating each letter of a message by a given amount. For example, if your rotate by 3, every A becomes D; every B becomes E; and so on. Toward the end of the alphabet, you wrap around: X becomes A; Y becomes B; and Z becomes C. Your program should prompt for a message and an amount by which to rotate each letter and should output the encoded message.

Answers

Answer:

Here is the JAVA program that produces Caeser cipher o given message string:

import java.util.Scanner;  //to accept input from user

public class Main {  

   public static void main(String args[]) {  //start of main function

       Scanner input = new Scanner(System.in);  //creates object of Scanner

       System.out.println("Enter the message : ");  //prompts user to enter a plaintext (message)

       String message = input.nextLine();  //reads the input message

       System.out.println("Enter the amount by which by which to rotate each letter : ");  //prompts user to enter value of shift to rotate each character according to shift

       int rotate = input.nextInt();  // reads the amount to rotate from user

       String encoded_m = "";  // to store the cipher text

       char letter;  // to store the character

       for(int i=0; i < message.length();i++)  {  // iterates through the message string until the length of the message string is reached

           letter = message.charAt(i);  // method charAt() returns the character at index i in a message and stores it to letter variable

           if(letter >= 'a' && letter <= 'z')  {  //if letter is between small a and z

            letter = (char) (letter + rotate);  //shift/rotate the letter

            if(letter > 'z') {  //if letter is greater than lower case z

               letter = (char) (letter+'a'-'z'-1); }  // re-rotate to starting position  

            encoded_m = encoded_m + letter;}  //compute the cipher text by adding the letter to the the encoded message

           else if(letter >= 'A' && letter <= 'Z') {  //if letter is between capital A and Z

            letter = (char) (letter + rotate);  //shift letter

            if(letter > 'Z') {  //if letter is greater than upper case Z

                letter = (char) (letter+'A'-'Z'-1);}  // re-rotate to starting position  

            encoded_m = encoded_m + letter;}  //computes encoded message

           else {  

         encoded_m = encoded_m + letter;  } }  //computes encoded message

System.out.println("Encoded message : " + encoded_m.toUpperCase());  }} //displays the cipher text (encoded message) in upper case letters

Explanation:

The program prompts the user to enter a message. This is a plaintext. Next the program prompts the user to enter an amount by which to rotate each letter. This is basically the value of shift. Next the program has a for loop that iterates through each character of the message string. At each iteration it uses charAt() which returns the character of message string at i-th index. This character is checked by if condition which checks if the character/letter is an upper or lowercase letter. Next the statement letter = (char) (letter + rotate);   is used to shift the letter up to the value of rotate and store it in letter variable. This letter is then added to the variable encoded_m. At each iteration the same procedure is repeated. After the loop breaks, the statement     System.out.println("Encoded message : " + encoded_m.toUpperCase()); displays the entire cipher text stored in encoded_m in uppercase letters on the output screen.

The logic of the program is explained here with an example in the attached document.

In this exercise we have to use the computer language knowledge in JAVA to write the code as:

the code is in the attached image.

In a more easy way we have that the code will be:

import java.util.Scanner;

public class Main {  

  public static void main(String args[]) {

      Scanner input = new Scanner(System.in);

      System.out.println("Enter the message : ");

      String message = input.nextLine();  

      System.out.println("Enter the amount by which by which to rotate each letter : ");  

      int rotate = input.nextInt();  

      String encoded_m = "";  

     char letter;  

      for(int i=0; i < message.length();i++)  {

          letter = message.charAt(i);

          if(letter >= 'a' && letter <= 'z')  {  

           letter = (char) (letter + rotate);  

           if(letter > 'z') {  

              letter = (char) (letter+'a'-'z'-1); }

           encoded_m = encoded_m + letter;}  

          else if(letter >= 'A' && letter <= 'Z') {

           letter = (char) (letter + rotate);  

           if(letter > 'Z') {  

               letter = (char) (letter+'A'-'Z'-1);}

           encoded_m = encoded_m + letter;}  

          else {  

        encoded_m = encoded_m + letter;  } }

System.out.println("Encoded message : " + encoded_m.toUpperCase());  }}

See more about JAVA at brainly.com/question/2266606

A DBMS commonly receives data update requests from application programs.A. TrueB. False

Answers

Answer:

A. True

Explanation:

DBMS is an acronym for database management system and it can be defined as a collection of software applications that typically enables computer users to create, store, modify, retrieve and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Some examples of a database management system (DBMS) are RDBMS, Oracle, SQL server, PostgreSQL, dBASE, Clipper, MySQL, Microsoft Access, etc.

A DBMS commonly receives data update requests from application programs through the Open Database Connectivity ( ODBC ) driver in case of communication with other database management softwares.

Basically, when a database management system (DBMS) receives data update requests from application programs, it simply instructs the operating system installed on a server to provide the requested data or informations.

A milk carton can hold 3.78 liters of milk. Each morning, a dairy farm ships cartons of milk to a local grocery store. The cost of producing one liter of milk and the profit of each carton of milk vary from farm to farm. Write a program that prompts the user to enter: The total amount of milk produced in the morning. The cost of producing one liter of milk. The profit on each carton of milk. The program then outputs: The number of milk cartons needed to hold milk. Round your answer to the nearest integer. The cost of producing milk. The profit for producing milk.

Answers

Answer:

milk_produced = float(input("Enter the total amount of milk produced in the morning: "))

liter_cost = float(input("Enter the cost of producing one liter of milk: "))

carton_profit = float(input("Enter the profit on each carton of milk: "))

carton_needed = round(milk_produced / 3.78)

cost = milk_produced * liter_cost

profit = carton_profit * carton_needed

print("The number of milk cartons needed to hold milk is " + str(carton_needed))

print("The cost of producing milk is " + str(cost))

print("The profit for producing milk is " + str(profit))

Explanation:

*The code is in Python.

Ask the user to enter milk_produced, liter_cost and carton_profit

Calculate the number of milk cartons needed, divide the milk_produced by the capacity (3.78) of a cartoon and round the result

Calculate the cost, multiply the milk_produced by liter_cost

Calculate the profit, multiply the carton_profit by carton_needed

Print the results

Maia wants to left align her paragraphs. Which button does she press?
o

Answers

the answer is the 2nd one because the 2nd and 4th line is moved over to the left

Answer:

It's B

Explanation:

On edge 2021

For demultiplexing a UDP socket is identified by:_____.

Answers

Answer:

1. Destination IP address

2. Destination Port number

Explanation:

Demultiplexing is a term that describes a procedure of transforming a signal that has multiple analog or digital signal flows into different initial and unconnected signals.

Hence, in this situation, the correct answer is that for the demultiplexing process, a UDP (User Datagram Protocol) socket is identified by both the destination IP address and destination port number

A file with a com extension is most likely to be a(n) ___ file.

Answers

I think that the answer is: A executable

Using computer software, compare the 2016 year-to-date sales through February to the 2017 year-to-date sales through February for each manufacturer by computing the difference. Using computer software, sort the list of the manufacturers in order of largest to smallest difference in year-to-date sales. Which manufacturers are in the top five with increased sales

Answers

Incomplete question. Here's a similar question found in the attachments.

Answer:

General Motors Corp, Chrysler, Ford Motor Company, Toyota Motors sales USA Inc, Nissan North America Inc.

Explanation:

By, using the MS Excel computer software, you would be able to compare the 2016 year-to-date sales through February 2017 year-to-date sales for each manufacturer.

Simply copy the data into the data cells of MS Excel, next use the =sum formula (which should have a minus sign; For example, =SUM (B5 - E5) would give you the difference between the 2016 sales and 2017 sales, only if sales for 2016 is found in column B row 5 and sales for 2017 in column E row 5).

Thus, the results obtained can further be evaluated to determine the manufacturers in the top five with increased sales.

Other Questions
A triangle has vertices located at C(-1,3), A(-1,-3) and T(7,-3). What is the length of the longest side of the triangle ? Ps: please show me the work (IMPORTANT) What is the formula for potassium nitrate? helppp pleaseeeeeeeee Which answer choice best explains how the bolded participial phrase is used in this sentence?The elderly couple dancing the tango in the ballroom swayed to the rhythms of the song. A. It is an adjective to describe the word couple. B. It is an adverb modifying the verb swayed. C. It is the active verb in the sentence. D. It is used as the subject noun of the sentence. What is the first step in solving the inequality StartFraction m minus 2 Over 6 EndFraction < 1? A.Multiply both sides by 6. B.Add 2 to both sides. C.Change the direction of the inequality. D.Change the inequality to . Sarah and her 4 friends share some cookies. If each person gets 3 cookies, how many cookies were shared? Write a mathematical equation that represents this situation. What is the absolute value of 3 2/3 whats the answer 2y5+4y53y35y3 he grocery store has bulk pecans on sale, which is great since you're planning on making 5 pecan pies for a wedding. How many pounds of pecans should you buy? First, determine what information you need to answer this question, then click here to display that info (along with other info). You will need to buy pounds of pecans. HELP!!! SHOW WORK PLS!! ITS URGENT Determine the measure of each angle. Then describe each angle as acute, right, obtuse, or straight. xAn arrangement of events in the order in which they took place is called _____. What is one example of how different group perspectives influenced historical events? A. The disagreements between Muslims and European Christians over who should control the Holy Land, led to the Crusades. B. The disagreements between the Spartans and the Athenians over who should control Greece, led to the wars with Persia. C. The disagreements between the Europeans and the Chinese over who should control the Silk Road, led to the voyages of Zheng He. D. The disagreements between the Romans and the Gauls over who should control Britain, led to the founding of the Roman Empire. What is the sum? (4x - 3) + (-2x + 5) Which choice correctly expresses the number below in scientific notation? Which are true regarding the statement "A quadrilateral having exactly one pair of parallel opposite sides is a trapezoid? Check all that apply. It is a conditional statement that can be written as If a quadrilateral has exactly one pair of parallel opposite sides, then it is a trapezoid. The hypothesis is: a quadrilateral having exactly one pair of parallel opposite sides. The hypothesis is: it is a trapezoid. The conclusion is: a quadrilateral having exactly one pair of parallel opposite sides. The conclusion is: it is a trapezoid. A workstations user prefers KDE over GNOME. Which login manager can this user run to ensure direct login to KDE? a. XDM b. KDM c. GDM d. Any of the above help please!find the value of x so that the figures have the same perimeter standard units of measure for density plzzzzzz helpppppp meeeeee