Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Needs to be done in Java Problem 2: Determining Left or Right For this programming project you are to read in a list of street

Needs to be done in Java image text in transcribed
Problem 2: Determining Left or Right For this programming project you are to read in a list of street addresses and determine how many of those addresses are on the right side of the street, and how many are on the left. The street addresses file is a text file that looks like: 6 3 33rd st Greenleat Ave 618 Yakina Ave 4 s Westgate st 3273 State st You can determine if an address is either on the left or right side of the street by looking at the number of the address; all even numbers are on the right side of the street, and all odd numbers are on the left side of the street. You will read your data into 2 arrays; an integer array to hold the street number, and a String array to hold the rest of the address. These will be parallel arrays, meaning the street number and street address of each index are related to each other Remember to draw a picture so that you can visualize this. You will need to write a method that will determine if each house is on the left or right side of the street. You will call this method for every street address, and then keep a count of how many houses are on the left and right sides of the street. The output should be the street number and address and then whether the house is on the left or right side of the street: Left/Right left right right left Address 6649 NBlue Gum St 4B Blue Ridge Blvd 8 w Cerritos Ave 54 639 Main st The number of houses on the left and right sides of the street should also be output

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions

Question

4. Limit average sentence length to 17 to 20 words.

Answered: 1 week ago