Your program may use the in-built Java method for rounding a floating point value to the nearest integer: Math.round (someFloatOrDouble). N.B. this method returns a double.
Your program may use the in-built Java method for rounding a floating point value to the nearest integer: Math.round (someFloatOrDouble). N.B. this method returns a double.
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%
Keeping in mind, only procedural

Transcribed Image Text:value and printed as an integer, as shown. The grade boundaries are: 70+ A.
60+ B, 50+ C, 40+ D, and otherwise F.
Your program may use the in-built Java method for rounding a floating point
value to the nearest integer: Math.round (someFloatOrDouble). N.B. this method
returns a double.
ECŞ401U & ECS401A (2022)
Page 11
Your program must:
• use at least one counter-controlled for-loop.
• be a procedural program. (Not an object-oriented program.)
• not use global variables. All variables should be declared as locally as
possible.
• You may assume that the user inputs integer values (and this is all you may
assume).
To gain a pass mark, your program must include meaningful use of an if-
statement and a loop.
For a high mark, your program must be functionally and clearly correct, and
make good use of methods that take arguments and/or return results. It should
have good style generally.
For a very high mark, your program must be elegantly written with outstanding
style, including good method decomposition.
JAN
MacBook Pro

Transcribed Image Text:10 / 29
75%
Write a FULL Java procedural program (not JHUB) to test a school student on
multiplication tables and print their results. It tests a series of x * y questions
where x ranges from x_start...x_end as specified by the user, and y from 1...12
(both inclusive).
Below are some examples of the required program behaviour: (bold is keyboard
input by the student).
Enter x start (start>0): 3
Enter x end (end>=start): 3
What is 3 * 1? 3
Correct.
What is 3 * 2? 8
Incorrect.
...
What is 3 * 12? 36
Correct.
You scored 7/12 (58%) C grade.
Here is another example run
Enter x start (x>0): 5
Enter x end (x>=start): 6
What is 5 * 1? 5
Correct.
...
What is 5 * 12? 60
Correct.
What is 6 * 1? 6
Correct.
...
What is 6 * 12? 72
Correct.
You scored 23/24 (96%) A grade.
The final figures and grades are just for illustration. The "..." represents lines
omitted here due to space limitations.
The program starts by asking the student for start and end values of x. The test
proceeds by asking the student to enter the answers for each multiplication in
the given ranges in order.
x_start * 1, ..., x_start * 12,
x_end * 1,
x_end * 12
one by one. The program states whether the answer is correct or incorrect after
each question. Finally, it prints a summary as illustrated above, stating how
many the student answered correctly, the percentage correct and the
corresponding grade. The percentage should be rounded to the nearest integer
value and printed as an integer, as shown. The grade boundaries are: 70+ A,
60+ B, 50+ C, 40+ D, and otherwise F.
Your program may use the in-built Java method for rounding a floating point
value to the nearest integer: Math.round (someFloatOrDouble). N.B. this method
returns a double.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 3 images

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