Question 2 (a) Write a program to repeatedly read in integers (negative and positive) from the user and zero (0) to terminate the reading. From the inputs, calculate how many are positive and how many are negative. (b) Create the following class method with Java: (i) Create a method called checkLast Digit that receives a String parameter. The method will display the last digit of the parameter. (ii) Write a method called sumScores that receives a double array as scores. This method will return the average of the scores.
Question 2 (a) Write a program to repeatedly read in integers (negative and positive) from the user and zero (0) to terminate the reading. From the inputs, calculate how many are positive and how many are negative. (b) Create the following class method with Java: (i) Create a method called checkLast Digit that receives a String parameter. The method will display the last digit of the parameter. (ii) Write a method called sumScores that receives a double array as scores. This method will return the average of the scores.
Chapter7: Using Methods
Section: Chapter Questions
Problem 2CP
Related questions
Question
java code, need question b (i) &(ii) only, No need question a
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 2 steps with 3 images
Knowledge Booster
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.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage