Write a complete Java program that performs the following tasks: 1. Ask the user to enter the last two digits of his/her student ID. 2. Break the number into two digits using arithmetic operators, then store the first and second digits in integer variables named digit1 and digit2 3. Find and print the following: Note: ● • The product of digit1 and digit2. • The sum of digit1 and digit2 The average of digit1 and digit2 The maximum of the two numbers; digitl digit2 using a method from the class Math. The class name of your Java program must be your first name. Your answer should have the code as text as well as the screenshot of the program output (using your own student ID) as a part of your answer. Otherwise, name: Hanan Mohammed k Alghamdi ID: S210027561 Typical run of the ● 03.java Help program Compile Messages JGRASP Messages Run 1/0 Interactions End Clear ----GRASP exec: java Q3 Enter the last two numbers of your student ID: 46 The first digit 4, the second digit =6 Product: 46 = 24.0 10.0 sum: 4+6 average :5.0 maximum is 6 ----GRASP: operation complete.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter6: Looping
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question
Please help me quickly and use my name and ID PLEASE HELP
Write a complete Java program that performs the following tasks:
1. Ask the user to enter the last two digits of his/her student ID.
2. Break the number into two digits using arithmetic operators, then store the first and
second digits in integer variables named digit1 and digit2
3. Find and print the following:
Note:
The class name of your Java program must be your first name.
Your answer should have the code as text as well as the screenshot of the
program output (using your own student ID) as a part of your answer.
Otherwise,
name: Hanan Mohammed k Alghamdi
ID: S210027561
Typical run of the
Q3.java
The product of digit1 and digit2.
The sum of digit1 and digit2
The average of digit1 and digit2
The maximum of the two numbers; digitl digit2 using a method from the
class Math.
Clear
Compile Messages JGRASP Messages Run 1/0 Interactions
End
Help
program
►
----jGRASP exec: java Q3
Enter the last two numbers of your student ID:
46
The first digit 4, the second digit =6
Product: 46 = 24.0
sum: 4 + 6 = 10.0
average :5.0
maximum is 6
----GRASP: operation complete.
Transcribed Image Text:Write a complete Java program that performs the following tasks: 1. Ask the user to enter the last two digits of his/her student ID. 2. Break the number into two digits using arithmetic operators, then store the first and second digits in integer variables named digit1 and digit2 3. Find and print the following: Note: The class name of your Java program must be your first name. Your answer should have the code as text as well as the screenshot of the program output (using your own student ID) as a part of your answer. Otherwise, name: Hanan Mohammed k Alghamdi ID: S210027561 Typical run of the Q3.java The product of digit1 and digit2. The sum of digit1 and digit2 The average of digit1 and digit2 The maximum of the two numbers; digitl digit2 using a method from the class Math. Clear Compile Messages JGRASP Messages Run 1/0 Interactions End Help program ► ----jGRASP exec: java Q3 Enter the last two numbers of your student ID: 46 The first digit 4, the second digit =6 Product: 46 = 24.0 sum: 4 + 6 = 10.0 average :5.0 maximum is 6 ----GRASP: operation complete.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning