Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem One - search for a section Creat a java class that has a 2D array of type String. It should have three columns and

Problem One - search for a section

Creat a java class that has a 2D array of type String. It should have three columns and three rows. The array should have in column 0, the values: Alexandria, Annandale, Loudoun.

In column one the values should be: 001A, 004B, 007C. In column two the values should be 002A, 005B, 008C and in column thee the values should be 003A, 006B, 009C.

Ask the user what campus they want to search. Return all three section numbers for that campus to the user. No need to loop.

Layout of data

Alexandria 001A 002A 003A

Annandale 004B 005B 006B

Loudoun007C 008C 009C

Problem two - difference

Creat a class that asks the user for two integers. Calculate the difference of the two numbers. If the first number is larger than the second number, output to the user that they have lost the difference, include the difference value. If the second number is larger than the first, then output to the user that they have gained the difference. For example: if the user entered 12 and 8 you would display "You have lost the difference of 4".

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_2

Step: 3

blur-text-image_3

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions