Write a complete Java program, including comments in both the main program and in each method, which will do the following: 0. The main program will start by calling a method named introduction() which will print out a description of what the program will do at the top of the first output page. This first method is called just once. This method will not be sent any parameters, and it will not return a value. It will print several lines of output explaining what the program does, and it will explain how the program should end (see step 4). 1. The main program will ask the user to type in three integer values, positive, negative, or zero (see step 4). The main program will print the three numbers right after they are read in. 2. The main program will call a method named findsum(), sending it the three integer values. The method will determine the sum of the larger 2 of the three values, sending the answer back to the main program. The main program will print the value returned. For example, if you send 4 6 2 to the method, the method will return 10, (4+6) and the main program will print that 10 is the sum. 3. The main program will call a method named printmyname(), sending it one parameter -- the sum of the integer values calculated in step 2. The method will print your name that many times, and the method will not return a value. (Be careful - see below.) For example, if the parameter to the method is 2, then the method should print your name 2 times. If the parameter is 4, the method should print your name 4 times. However, if the parameter sent in is less than or equal to 0, or if the parameter sent in is greater than 10, the method will say it is not possible to print the name. |For example, if the parameter is -2, the method will say in this case it is not possible to print the name. If the parameter is 12, the method will say it is not possible to print the name. 4. The main program will call a method named howmanyeven, sending it all three integers. The method will determine how many (0,1,2,0r 3) of the values are even and return that value to the main program. (Hint: Even means divisible by 2 with no remainder, and there is an operator that will tell you the remainder.) The main program will print an appropriate message: There is/are_ even number(s). 5. Then the main program will skip a few lines and go back to step 1 (not step 0). At step 1, if the user types in a special combination, the program will go to step 5. You must determine what this combination is, and you must explain it-in a prompt or in a comment, and in the introduction at the beginning--to the person using the program. 6. At the end, print how many sets of three data values were entered and processed. Make sure that this value is at least 8.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
DATA: You will be judged on the quality of your data.
Type in a total of at least 8 sets of data values.
Have at least two sets where the sum is less than 1.
Have at least two sets where the sum is more than 10.
Have at least four sets where you do print your name one or more times.
Be sure to include both 1 and 10 as valid sets.
STYLE: Be sure that each method has a good comment explaining two things: exactly
what parameter(s) the method will receive, and exactly what the method will do–for
example, if it returns an answer or prints. For each method, mention the method's
parameters by name in the comment.
OUTPUT: Here is some sample output (ignoring the introduction):
the three original integers are -5, 3, -5
the sum is -2
it is not possible to print the name in this case
there is/are 0 even number(s)
the three original integers are 4, -1, -3
the sum is 3
your name
your name
(your name printed 3 times)
your name
there is/are 1 even number(s)
Transcribed Image Text:DATA: You will be judged on the quality of your data. Type in a total of at least 8 sets of data values. Have at least two sets where the sum is less than 1. Have at least two sets where the sum is more than 10. Have at least four sets where you do print your name one or more times. Be sure to include both 1 and 10 as valid sets. STYLE: Be sure that each method has a good comment explaining two things: exactly what parameter(s) the method will receive, and exactly what the method will do–for example, if it returns an answer or prints. For each method, mention the method's parameters by name in the comment. OUTPUT: Here is some sample output (ignoring the introduction): the three original integers are -5, 3, -5 the sum is -2 it is not possible to print the name in this case there is/are 0 even number(s) the three original integers are 4, -1, -3 the sum is 3 your name your name (your name printed 3 times) your name there is/are 1 even number(s)
CIS 1115
Assignment 3
Spring 2021
Write a complete Java program, including comments in both the main program and in
each method, which will do the following:
0. The main program will start by calling a method named introduction() which will print
out a description of what the program will do at the top of the first output page. This first
method is called just once.
This method will not be sent any parameters, and it will not return a value. It will print
several lines of output explaining what the program does, and it will explain how the
program should end (see step 4).
1. The main program will ask the user to type in three integer values, positive, negative,
or zero (see step 4). The main program will print the three numbers right after they are
read in.
2. The main program will call a method named findsum(), sending it the three integer
values. The method will determine the sum of the larger 2 of the three values, sending
the answer back to the main program.
The main program will print the value returned. For example, if you send 4 6 2 to the
method, the method will return 10, (4+6) and the main program will print that 10 is the
sum.
3. The main program will call a method named printmyname(), sending it one
parameter - the sum of the integer values calculated in step 2. The method will print
your name that many times, and the method will not return a value. (Be careful - see
below.)
For example, if the parameter to the method is 2, then the method should print your name
2 times. if the parameter is 4, the method should print your name 4 times.
However, if the parameter sent in is less than or equal to 0, or if the parameter sent in
is greater than 10, the method will say it is not possible to print the name. |For example, if
the parameter is -2, the method will say in this case it is not possible to print the name. If
the parameter is 12, the method will say it is not possible to print the name.
4. The main program will call a method named howmanyeven, sending it all three
integers. The method will determine how many (0,1,2,0or 3) of the values are even and
return that value to the main program. (Hint: Even means divisible by 2 with no
remainder, and there is an operator that will tell you the remainder.)
The main program will print an appropriate message: There is/are_ even number(s).
5. Then the main program will skip a few lines and go back to step 1 (not step 0).
At step 1, if the user types in a special combination, the program will go to step 5.
You must determine what this combination is, and you must explain it-in a prompt or in a
comment, and in the introduction at the beginning-to the person using the program.
6. At the end, print how many sets of three data values were entered and processed.
Make sure that this value is at least 8.
Transcribed Image Text:CIS 1115 Assignment 3 Spring 2021 Write a complete Java program, including comments in both the main program and in each method, which will do the following: 0. The main program will start by calling a method named introduction() which will print out a description of what the program will do at the top of the first output page. This first method is called just once. This method will not be sent any parameters, and it will not return a value. It will print several lines of output explaining what the program does, and it will explain how the program should end (see step 4). 1. The main program will ask the user to type in three integer values, positive, negative, or zero (see step 4). The main program will print the three numbers right after they are read in. 2. The main program will call a method named findsum(), sending it the three integer values. The method will determine the sum of the larger 2 of the three values, sending the answer back to the main program. The main program will print the value returned. For example, if you send 4 6 2 to the method, the method will return 10, (4+6) and the main program will print that 10 is the sum. 3. The main program will call a method named printmyname(), sending it one parameter - the sum of the integer values calculated in step 2. The method will print your name that many times, and the method will not return a value. (Be careful - see below.) For example, if the parameter to the method is 2, then the method should print your name 2 times. if the parameter is 4, the method should print your name 4 times. However, if the parameter sent in is less than or equal to 0, or if the parameter sent in is greater than 10, the method will say it is not possible to print the name. |For example, if the parameter is -2, the method will say in this case it is not possible to print the name. If the parameter is 12, the method will say it is not possible to print the name. 4. The main program will call a method named howmanyeven, sending it all three integers. The method will determine how many (0,1,2,0or 3) of the values are even and return that value to the main program. (Hint: Even means divisible by 2 with no remainder, and there is an operator that will tell you the remainder.) The main program will print an appropriate message: There is/are_ even number(s). 5. Then the main program will skip a few lines and go back to step 1 (not step 0). At step 1, if the user types in a special combination, the program will go to step 5. You must determine what this combination is, and you must explain it-in a prompt or in a comment, and in the introduction at the beginning-to the person using the program. 6. At the end, print how many sets of three data values were entered and processed. Make sure that this value is at least 8.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Top down approach design
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education