Question

In: Computer Science

Write a program that implements the pseudocode ("informal high-level description of the operating principle of a...

Write a program that implements the pseudocode ("informal high-level description of the operating principle of a computer program or other algorithm") below:
1. Ask the user for the size of their apartment in square meters (size)
2. Convert the size to square feet using the formula: convertedSize = size * 10.764
3. Print out the converted size.

Have meaningful prompts and meaningful explanation of any numbers printed.

Solutions

Expert Solution

Program:

import java.util.Scanner;

public class MeterToFeetConversion {

   public static void main(String[] args) {

       System.out.print("Please enter the size of apartment in square meters : ");
      
       // Create Scanner object to get user input
       Scanner in = new Scanner(System.in);
      
       // get user input for size of apartment in square meters
       float inputMeters = in.nextFloat();
      
       // convert size of apartment from square meter to square feet
       float meterToFeet = (float) (inputMeters * 10.764);
      
       // print the size of apartment in square feet
       System.out.println("The size of apartment in square feet : " + meterToFeet);

   }

}

Sample Output:

Please enter the size of apartment in square meters : 2
The size of apartment in square feet : 21.528


Related Solutions

write pseudocode for the following problems not c code Pseudocode only Write a C program to...
write pseudocode for the following problems not c code Pseudocode only Write a C program to print all natural numbers from 1 to n. - using while loop Write a C program to print all natural numbers in reverse (from n to 1). - using while loop Write a C program to print all alphabets from a to z. - using while loop Write a C program to print all even numbers between 1 to 100. - using while loop...
Given the below pseudocode, write the proper code that implements it using MARIE's assembly language:               ...
Given the below pseudocode, write the proper code that implements it using MARIE's assembly language:                    Input a number and store it in X; if X > 1 then    Y := X + X;    X := 0; endif; Y := Y + 1; Output the value of Y; N.B: You should include the MARIE code in your Answer, with an explanation of each instruction in your code beside it. Example:              Subt One         /Subtract 1 from AC Add a...
C Program and pseudocode for this problem. Write a C program that plays the game of...
C Program and pseudocode for this problem. Write a C program that plays the game of "Guess the number" as the following: Your program choose the number to be guessed by selecting an integer at random in the rang of 1 to 1000. The program then asks the use to guess the number. If the player's guess is incorrect, your program should loop until the player finally gets the number right. Your program keeps telling the player "Too High" or...
write pseudocode not c program If- else programming exercises 1.    Write a C program to find...
write pseudocode not c program If- else programming exercises 1.    Write a C program to find maximum between two numbers. 2.    Write a C program to find maximum between three numbers. 3.    Write a C program to check whether a number is negative, positive or zero. 4.    Write a C program to check whether a number is divisible by 5 and 11 or not. 5.    Write a C program to check whether a number is even or odd. 6.    Write...
Program Specifications: Write a program that defines a class HumanBMI, implements it as required, and tests...
Program Specifications: Write a program that defines a class HumanBMI, implements it as required, and tests the class implementation. The class definition and implementation should be separated into HumanBMI.h and HumanBMI.cpp files. A. The class HumanBMI consists of three private member variables: name of type string, height of type int in inches, and weight of type int in pounds. The class HumanBMI also includes the following public member functions: 1) setName to set the name member variable with a string...
DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that...
DESIGN A FLOWCHART IN FLOWGORITHM AND WRITE THE PSEUDOCODE Number Analysis Program Design a program that asks the user to enter a series of 20 numbers. The program should store the numbers in an array and then display the following data: The lowest number in the array. The highest number in the array. The total of the numbers in the array. The average of the numbers in the array. PLEASE AND THANK YOU
please write a C program that implements Quick Sort algorithm.
please write a C program that implements Quick Sort algorithm.
write a program including the pseudocode write a progrqm that outputs a grade based on user...
write a program including the pseudocode write a progrqm that outputs a grade based on user input. an example if the user enters an 80 the program will output the grade is B. grading scale: 90-100=A 80-89=B 70-79=C 65-69=D 0-64=F
Write a program in C++ that efficiently implements a skip list that holds integers. Your program...
Write a program in C++ that efficiently implements a skip list that holds integers. Your program should: 1. Accurately implement the skip list ADT using a random number generator and nodes that contain an integer as well as the addresses of adjacent nodes to the left, right, up, and down. 2. Correctly implement the Insert, Search, and Delete operations. 3. Read a series of unique, newline-delineated integers from a file and insert them (one at a time in the order...
Write a MARIE program that implements the following logic. If X < Y Then X =...
Write a MARIE program that implements the following logic. If X < Y Then X = X + Y Else Y = 2X Assume the two numbers are X and Y and are entered by the user. Provide prompts to the user to enter the numbers and provide a meaningful output to the screen.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT