Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8:46 AM Wed Mar 13 94%- 4.scanner-string-Odd EvenLine-lab java-apus.doc A+ Computer Science ODD EVEN LINE Lab Goal This lab was designed for you to learn

image text in transcribed
image text in transcribed
image text in transcribed
8:46 AM Wed Mar 13 94%- 4.scanner-string-Odd EvenLine-lab java-apus.doc A+ Computer Science ODD EVEN LINE Lab Goal This lab was designed for you to learn more about using Scanner to chop up Strings. Lab Description Take a group of numbers all on the same line and determine how many are odd and how many are even. An even number is evenly divisible by two and an odd number is not evenly divisible by two. You can test divisibility using the mod(%) operator Sample Data 9 10 5 20 11 22 33 44 55 66 77 3 5 3 1575 4 3 2 7 8 99 9 6 2 46 8 2 4 6 1 3 5 7913 5 iles Needed: venCounter. ava OddEvenCounterR unner. java Sample Output 9 10 5 20 even count 2 odd count 2 11 22 33 44 55 66 77 even count 3 odd count 4 3 5 3 1 5 7 5 4 3 278999 6 even count4 odd count-12 8:46 AM Wed Mar 13 94% OddEvenCounter.java //(c) A+ Computer Science //www.apluscompsci.com /Name - import java.util.Scanner; import static java.lang.System. public class OddEvenCounter private String line; public OddEvenCounter) public OddEvenCounter(String s) public void setLine(String s) public int getEvenCounto int count 0; return count; public int getOddCount0) int count 0 return count; public String toString return 8:46 AM Wed Mar 13 94% OddEvenCounterRunner.java //(c) A+ Computer Science //www.apuscompsci.com /Name import java.util.Scanner; import static java.lang.System.* public class OddEvenCounterRunner public static void main(String args)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Master The Art Of Data Storytelling With Visualizations

Authors: Alexander N Donovan

1st Edition

B0CNMD9QRD, 979-8867864248

More Books

Students also viewed these Databases questions