PI Instructions Think about the following problem statement: Write an application that inputs three integers from the user and displays the sum, average, product, smallest, and largest of the numbers. [Note: The calculation of the average should result in an integer representation of the average. So, if the sum of the values is 7, the average should be 2, not 2.3333....] Think about how you would approach this as you address the following questions: 1. What data type(s) would you use, how many variables would you need to declare, and what would you store in them? Please consider that you'll need variables to store the user's input and variables to which you assign values from your calculations. Explain your reasoning. 2. What is the difference between a local variable and an instance variable? 3. The output will need to be formatted. How would you format the output so it's presented to the user in a usable way? Upload the questions and your answers in an MS Word document and be prepared to discuss it with the class during our in-class discussion.
PI Instructions Think about the following problem statement: Write an application that inputs three integers from the user and displays the sum, average, product, smallest, and largest of the numbers. [Note: The calculation of the average should result in an integer representation of the average. So, if the sum of the values is 7, the average should be 2, not 2.3333....] Think about how you would approach this as you address the following questions: 1. What data type(s) would you use, how many variables would you need to declare, and what would you store in them? Please consider that you'll need variables to store the user's input and variables to which you assign values from your calculations. Explain your reasoning. 2. What is the difference between a local variable and an instance variable? 3. The output will need to be formatted. How would you format the output so it's presented to the user in a usable way? Upload the questions and your answers in an MS Word document and be prepared to discuss it with the class during our in-class discussion.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
100%
Expert Solution
Step 1
Answer:
// Find largest. smallest product, sum and average of three numbers in Java
import java.util.*;
public class Numbers {
public static void main(String args[]) {
int a, b,c,avg, sum=0;
Scanner buf = new Scanner(System.in);
System.out.print("\nEnter first integer : ");
a = buf.nextInt();
System.out.print("\nEnter second integer : ");
b = buf.nextInt();
System.out.print("\nEnter thired integer : ");
c = buf.nextInt();
Step by step
Solved in 2 steps
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY