1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
nata0808 [166]
3 years ago
11

Write an application that displays appropriate prompts to the user and reads a person

Computers and Technology
1 answer:
vfiekz [6]3 years ago
3 0

Answer:

The program to this question can be given as:

Program:

import java.util.*; //import package  

public class Person_detail //define class

{

public static void main(String ar[]) //define main function

{

String Name,hobby,dream_Job; //declare variable.

int age;

Scanner sc = new Scanner(System.in); //creating Scanner class object for user input.

System.out.print("Enter Your Name : "); //message  

name = sc.next(); //user input

System.out.print("Enter Your Age : ");

age = sc.nextInt();

System.out.print("Enter Your hobby: ");

hobby = sc.next();

System.out.print("Enter Your aim: ");

aim = sc.next();

//print values.

System.out.println("Hello, my name is "+name+" and I am "+age);

System.out.println("years old.My hobby is playing "+hobby+".");

System.out.println("I want to be a "+aim+" when I grow up!");

}

}

Output:

Hello, my name is XXX and I am 21

years old.My hobby is playing cricket .

I want to be a cricketer when I grow up!.

Explanation:

In the above program firstly we import the package for user input. Then we declare a class that is Person_detail. In this class, we declare the main function. In the main function, we declare a variable that is name, hobby, aim, and age. In these variable first 3 variables datatype is string and age variable data type in integer. Then we create a scanner class object and take input from the user and print it into a paragraph.

You might be interested in
Give me facts on john john son
Svetradugi [14.3K]

Answer: Story -

In 1951, John H. Johnson was selected as Young Man of the Year by the United States Chamber of Commerce. He was the first African-American to receive such honor. In 1966, he received Spingarn Medal by the National Association for the Advancement of Colored People for his contributions in the area of race relations.

Born -  

January 19, 1918, Arkansas City, AR

Died -

August 8, 2005, Chicago, IL

Spouse -

Eunice W. Johnson

(married at 1941–2005)

Children -

Linda Johnson Rice, John Harold Johnson

Explanation:

8 0
3 years ago
According to your​ reading, Macy's uses​ ________ technology to track individual items for sale on store shelves.
Setler79 [48]
She uses the Radio-frequency identification(RFID) which is a technology that uses electromagnetic fields to automatically identify and track tags attached to objects.These tags contain electronically-stored information.the passive tags collect energy from a nearby RFID readers interrogating radio waves.They contain an integrated circuit and an antenna which are used to transmit data to the RFID reader also called an interrogator.
8 0
3 years ago
Read 2 more answers
By generating and delivering timely and relevant information supported by networks, _____ creates new opportunities for conducti
castortr0y [4]

Answer:

The correct option to the following question is option (B). e-business.

Explanation:

E-business is stands for the Electronic business.

E-business is the business which is conduct by the uses of the internet, Web, extranet or intranet, etc.

E-business is also known as the online business where online transactions take place.

E-business facilitates our customers that the selling and the buying of the goods between the consumers and the merchants.

7 0
3 years ago
File Sales.java contains a Java program that prompts for and reads in the sales for each of 5 salespeople in a company. It then
myrzilka [38]

Answer:

import java.util.Scanner;

public class Sales

{

public static void main(String[] args) {

   

    int sum;

    Scanner input = new Scanner(System.in);

   

    System.out.print("Enter number of salespeople: ");

    int salespeople = input.nextInt();

    int[] sales = new int[salespeople];

       

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

    {

     System.out.print("Enter sales for salesperson " + (i+1) + ": ");

     sales[i] = input.nextInt();

    }

    System.out.println("\nSalesperson   Sales");

    System.out.println("--------------------");

    sum = 0;

       int maxSale = sales[0];

       int minSale  = sales[0];

       int minId=1;

       int maxId=1;

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

    {

               System.out.println("     " + (i+1) + "         " + sales[i]);

 sum += sales[i];

  if(maxSale < sales[i])

           {

               maxSale = sales[i];

               maxId = i+1;

           }

           if(minSale > sales[i])

           {

               minSale = sales[i];

               minId = i+1;

           }

   }

System.out.println("Total sales: " + sum);

       System.out.println("The average sale is: " + sum / salespeople );

       System.out.println("Salesperson "+ maxId + " had the highest sale with "+ maxSale + ".");

       System.out.println("Salesperson "+ minId + " had the lowest sale with "+ minSale + ".");

       

       int amount = 0;

       int counter = 0;

       System.out.print("Enter an amount: ");

       amount = input.nextInt();

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

    {

     if(sales[i] > amount) {

         counter++;

         System.out.println("Salesperson "+ (i+1) + " exceeded given amount. (Number of sales: " + sales[i] +")");

     }

    }

       System.out.println("Number of salespeople exceeded given amount is: "+ counter);

}

}

Explanation:

- Ask the user for the number of salesperson

- According to entered number, create an array called sales to hold sale number for each person

- In the first for loop, assign the given sales numbers

-  In the second for loop, print all the sales people with sales, calculate the total sales. Also, find the minimum and maximum sales numbers with associated individuals.

- Print total, average, highest, and lowest sales.

- Ask user enter an amount

- In the third for loop, find the sales people who exceeded this amount.

- Print number of sales people who exceeded the amount.

8 0
3 years ago
What is the formula equivalent to the function =SUM(B1:B5)? A. =B1+B5 B. =$B$1+$B$5 C. =B1+B2+B3+B4+B5 D. =$B$1+$B$2+$B$3+$B$4+$
Contact [7]

Given the options, I would choose Option C. =B1+B2+B3+B4+B5.

5 0
3 years ago
Other questions:
  • Your boss asks you to work through the weekend to install new software on the applications server that serves up applications to
    15·2 answers
  • What are the coordinates of (3 comma space 8 )relative to the basis open curly brackets space (1 comma space 1 )comma space (0 c
    15·1 answer
  • Which of the following would be considered a primary source of information?
    6·1 answer
  • Fortnite anyone? i just started tdy so dont be judgiee lol
    6·2 answers
  • A network that typically reaches a few meters, such as up to 10 meters (33 feet), and consists of personal devices such as mobil
    14·1 answer
  • What protocol communicates data between routers representing the edges of autonomous systems?Distance-vectorLink stateInterior g
    11·1 answer
  • Which part(s) of CAIN is realized through the use of message digest functions and hashes?
    14·1 answer
  • Write a program that converts or calculates values. Use the following guidelines to write your program:
    9·1 answer
  • PLZZZZZZZZZZZZZZZ HELP ME OUT!!!!! I SICK AND TIRED OF PEOPLE SKIPING MYQUESTION WHICH IS DUE TODAY!!!!
    14·1 answer
  • When an EC2 instance is being modified to have more RAM, is this considered Scaling Up or Scaling Out?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!