Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IN JAVA: Write a program using a SWITCH as your main data structure that reads a web address (for instance, www.apu.edu) from the keyboard using

IN JAVA:

Write a program using a SWITCH as your main data structure that reads a web address (for instance, www.apu.edu) from the keyboard using the Scanner and outputs whether this web address is for a government, a university, a business, an organization, or unknown entity:

If web address contains .gov, it is a government web address

If web address contains .edu, it is a university web address

If web address contains .com, it is a business web address

If web address contains .org, it is an organization web address

Otherwise, it is a web address for an unknown entity

HINT: You may assume the domain type will always end in a . and three letters (e.g., .gov, .edu, etc. You will need to isolate just this portion of the web address into its own string and switch on that sub-string.

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

a. Should Hart purchase the paper company?

Answered: 1 week ago