Help me fix my code to my java problem assignment please What is wrong with my code? The assignment is called Interstate highway numbers in zybooks 3.24 for Java Im trying to get my code 200 is not a valid interstate highway number. As my answer Instead I’m getting I-200 is auxiliary, serving I-0, going east/west. As the answer Help me fix that one problem with my code thank you
Help me fix my code to my java problem assignment please What is wrong with my code? The assignment is called Interstate highway numbers in zybooks 3.24 for Java Im trying to get my code 200 is not a valid interstate highway number. As my answer Instead I’m getting I-200 is auxiliary, serving I-0, going east/west. As the answer Help me fix that one problem with my code thank you
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
Help me fix my code to my java problem assignment please
What is wrong with my code?
The assignment is called Interstate highway numbers in zybooks 3.24 for Java
Im trying to get my code
200 is not a valid interstate highway number.
As my answer
Instead I’m getting
I-200 is auxiliary, serving I-0, going east/west.
As the answer
Help me fix that one problem with my code thank you
![1: JAVA Pro X
O Program Help : cprogramming
Content
Content
ECHCCCSC151TeterSpring2022/chapter/3/section/24
g home > 3.24: LAB: Interstate highway numbers
Your output
I-290 is auxiliary, serving I-90, going east/west.
3: Invalid (0) ^
1/1
Input
Your output
0 is not a valid interstate highway number.
4: Compare output a
0/1
Output differs. See highlights below.
Special character legend
Input
200
Your output
I-200 is auxiliary, serving I-0, going east/west.
Expected output
200 is not a valid interstate highway number.
5: Compare output a
2/2
Input
5
Your output
I-5 is primary, going north/south.
2/2
6: Compare output a
Input
405
Your output
I-405 is auxiliary, serving I-5, going north/south.
2/2
7: Compare output a
Input
1000
立](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6961aa18-8474-4466-bd14-b02bea60c27d%2F7344fbf3-88f8-44f9-849d-54a8bac2edcd%2F6ae413q_processed.jpeg&w=3840&q=75)
Transcribed Image Text:1: JAVA Pro X
O Program Help : cprogramming
Content
Content
ECHCCCSC151TeterSpring2022/chapter/3/section/24
g home > 3.24: LAB: Interstate highway numbers
Your output
I-290 is auxiliary, serving I-90, going east/west.
3: Invalid (0) ^
1/1
Input
Your output
0 is not a valid interstate highway number.
4: Compare output a
0/1
Output differs. See highlights below.
Special character legend
Input
200
Your output
I-200 is auxiliary, serving I-0, going east/west.
Expected output
200 is not a valid interstate highway number.
5: Compare output a
2/2
Input
5
Your output
I-5 is primary, going north/south.
2/2
6: Compare output a
Input
405
Your output
I-405 is auxiliary, serving I-5, going north/south.
2/2
7: Compare output a
Input
1000
立
![151: JAVA Prc X
O Program Help : cprogramming
Content
Content
YTECHCCCSC151TeterSpring2022/chapter/3/section/24
ing home > 3.24: LAB: Interstate highway numbers
354532 2042412 qzay7
LAB
3.24.1: LAB: Interstate highway numbers
ACTIVITY
9/10
LabProgram.java
Load default template...
1 import java.util.Scanner;
2
3 public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int highwayNumber;
int primaryNumber;
4
6.
7
8
9.
highwayNumber = scnr.nextInt();
10
%3D
11
12
primaryNumber - highwayNumber % 100;
13
14
if ((highwayNumber > 0) && (highwayNumber < 100))
{
if (highwayNumber % 2 -- 0)
{
System.out.println("I-" + highwayNumber + " is primary, going east/west.");
}
else
15
16
17
18
19
20
21
{
System.out.println("I-" + highwayNumber + " is primary, going north/south. ");
}
22
23
24
25
else if ((highwayNumber > 99) && (highwayNumber < 1000))
if (highwayNumber % 2 == 0)
{
System.out.println("I-" + highwayNumber + " is auxiliary, serving " + "I-" + primaryNumber + ", going eas
26
27
28
29
30
31
else
32
{
System.out.println("I-" + highwayNumber + " is auxiliary, serving " + "I-" + primaryNumber + ", going nor
}
else if ((highwayNumber < 1) || (highwayNumber > 999))
{
System.out.println(highwayNumber + " is not a valid interstate highway number.");
33
34
35
36
37
38
39
40
41
42 }](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F6961aa18-8474-4466-bd14-b02bea60c27d%2F7344fbf3-88f8-44f9-849d-54a8bac2edcd%2Flea15eb_processed.jpeg&w=3840&q=75)
Transcribed Image Text:151: JAVA Prc X
O Program Help : cprogramming
Content
Content
YTECHCCCSC151TeterSpring2022/chapter/3/section/24
ing home > 3.24: LAB: Interstate highway numbers
354532 2042412 qzay7
LAB
3.24.1: LAB: Interstate highway numbers
ACTIVITY
9/10
LabProgram.java
Load default template...
1 import java.util.Scanner;
2
3 public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int highwayNumber;
int primaryNumber;
4
6.
7
8
9.
highwayNumber = scnr.nextInt();
10
%3D
11
12
primaryNumber - highwayNumber % 100;
13
14
if ((highwayNumber > 0) && (highwayNumber < 100))
{
if (highwayNumber % 2 -- 0)
{
System.out.println("I-" + highwayNumber + " is primary, going east/west.");
}
else
15
16
17
18
19
20
21
{
System.out.println("I-" + highwayNumber + " is primary, going north/south. ");
}
22
23
24
25
else if ((highwayNumber > 99) && (highwayNumber < 1000))
if (highwayNumber % 2 == 0)
{
System.out.println("I-" + highwayNumber + " is auxiliary, serving " + "I-" + primaryNumber + ", going eas
26
27
28
29
30
31
else
32
{
System.out.println("I-" + highwayNumber + " is auxiliary, serving " + "I-" + primaryNumber + ", going nor
}
else if ((highwayNumber < 1) || (highwayNumber > 999))
{
System.out.println(highwayNumber + " is not a valid interstate highway number.");
33
34
35
36
37
38
39
40
41
42 }
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
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…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
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)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
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](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY