Project 1 The project is designed to be done on your own. The project must be your own work, and not copied from others or from any other course, textbook or website. If plagiarism is detected...

Project 1

The project is designed to be done on your own. The project must be your own work, and not copied from others or from any other course, textbook or website. If plagiarism is detected appropriate consequences will follow. Please refer to Policy ST2: Student academic integrity ( https://www.kpu.ca/sites/default/files/downloads/Honesty1432.pdf)

Objectives:

Problem Specifications:

Write a Java program that prompts the user to enter two lines of words. The words are separated by spaces. Extract the words from the two lines into two lists. Write the following methods that do the:

1- Display the union of the two lists in ascending alphabetical order using quick sort. 2- Display the difference of the two lists in descending alphabetical order using merge sort. 3- Display the intersection of the two lists in ascending alphabetical order using quick sort. 4- Recursively display the number of vowel letters in each list. The letters for vowels are A, E, I, O, and U. 5- Display a menu of six options: insert two lists, display the union, display the difference, display the intersection, display the vowel letters, and end program.

Find the time complexity of the above five methods. Write the Bio-O notation as a comment next to each method. Use ^ to represent the power sign (Example N3 = N^3)

Here is a sample of an output:

Line 1: red green blue yellow purple cyan orange

Line 2: red black brown cyan orange pink

The union is [black, blue, brown, cyan, cyan, green, orange, orange, pink, purple, red, red, yellow]

The difference is [blue, green, purple, yellow]

The intersection is [cyan, orange, red]

The number of vowels in the first line is: 13

The number of vowels in the second line is: 8
Feb 15, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here