Question: Task 2 (25 pts.) Create project: HW2_Wiki Submit java file: HW2_Wiki.java WIkipedia pages have a specific webpage address. Any address starts with https://en.wikipedia.org/wiki/ and then

 Task 2 (25 pts.) Create project: HW2_Wiki Submit java file: HW2_Wiki.java

Task 2 (25 pts.) Create project: HW2_Wiki Submit java file: HW2_Wiki.java WIkipedia pages have a specific webpage address. Any address starts with https://en.wikipedia.org/wiki/ and then continues with the topic for that page e.g Computer science, Java_(programming language). See examples below https://en.wikipedia.org/wiki/computer science https://en.wikipedia.org/wiki/Java (programming_language) https://en.wikipedia.org/wiki/Imagine Dragons Write a program that reads a string from the user. If it is a valid wikipedia webpage, it extracts and prints the topic for that page. If it is not a valid address it prints the message Not a valid wikipedia webpage address. Hint: How can the fact that all valid addresses start with the same text before the topic name help you extract the topic name? You do NOT need to handle the case where the webpage address is correct, but it is written in uppercase letters. You can assume it is all lowercase the text is all in lowercase and . if the address is valid, then it will have at least one more character for the topic. That is, you do not need to handle an input like: https://en. wikipedia.org/wiki/. -- Sample run 1 This program will extract the topic from a valid Wikipedia webpage addre: Enter a web address: https://en.wikipedia.org/wiki/Computer science Topic: Computer science Sample run 2 This program will extract the topic from a valid Wikipedia webpage addre: Enter a web address: http://vlml.uta.edu/-alex/courses/1310/homework/hw0 Not a valid wikipedia webpage address. Bye -sample run 3 This program will extract the topic from a valid Wikipedia webpage addre: Enter a web address: https://en.wikipedia.org/wiki/ Topic: Bye

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!