Q Using JavaScript, your task is to create an HTML document with a textarea form. However, the challenge does not end here. You must also develop code that analyses the user input in the textarea and displays the number of vowels typed, highlighting the one typed the most.

When you are finished, your final result should resemble the following example image:

Submit an HTML5 application in which you allow users to freely input text. After the text is input, users must be able to click a button to display a count of all vowels typed in the textarea. Your application must include the following features/functionality:

An HTML form with a textarea, five text boxes and a button

Invite the user to type 10 or more characters in the textarea and then click on the button.

Validate the textarea by ensuring that it is not left blank. As an additional (optional) task, you may wish to generate a separate error message if there is input that includes no vowels.

Write one or more JavaScript functions in an external .js file that will read through the input and count the number of letters which are vowels: A, E, I, O, U. Keep five separate counts, one for each of the vowels. Hint: The value of a single character in a string can be saved like this:singleCharacter = stringName.charAt(i); where i indicates the position of the character in the string.

The five vowel totals must be in the five output boxes.

Place the five vowel totals in an array and search through the array to see which letter appears most frequently in the input. Hint: Think about using a variable called something like ,biggestSoFar. Change the background colour of the output box displaying the total of the most frequently occurring vowel to yellow or gold. To provide some evidence that you have gone beyond the requirements, you may wish (as an optional task) to also find the second and third most frequently occurring vowels in the input. Change the background colour of their input boxes to silver and brown or bronze. 

Here's the assignment:
Week 1: Assignment Details

The task this week is to complete the following 2 structures using a linked list:


Assume the occurrence of a linked list node is represented by the object “Node” and its “Data” and “NextRef” attributes.
Part 1: Assume a “Head” node exists with the NextRef attribute pointing to the first node in the stack or being null if the stack is empty. Create pseudo code for the following 3 stack methods, showing the logic tied to the inverted list. Include a summary of these actions. 

push( item )
pop( )
display( )

Part 2: Assume “Front” and “Rear” nodes exist with the “NextRef” attributes pointing to the first and last nodes of the queue or being null if the queue is empty. Create pseudo code for the following 3 queue methods, showing the logic tied to the inverted list. Include a summary of these actions.

enqueue( item )
dequeue( )
display( )

Week 1 Deliverables:

Pseudo code implemented for both the stack and queue methods
Documented pseudo code
Add the completed pseudo code and discussion to the Key Assignment template Section 1: Lists, Stacks, and Queues

Powered by