Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your task is to create an application named teacher.html that allows a teacher to enter the name and the test scores for a student at

Your task is to create an application named teacher.html that allows a teacher to enter the name and the test scores for a student at a point of a semester the scores are as low as 0 and as high as 100. After each entry, the application should continue to prompt the user if they would like to enter another score the user must type Y or N. When the user indicates that they have no more scores to enter for that particular student, the user should be prompted if they would like to enter another student (Y or N) and continue on. Once the user is done entering students and their scores, each student with their average score should be displayed in one alert box. Entering Student Names Should not be empty If it is empty, the user should continually be asked to enter until correct All of this logic should exist inside one function Entering Student Scores Should not be empty Should be between 1 100 inclusive If invalid, the user should continually be asked to enter until correct All of this logic should exist inside a second function Entering Whether There is Another Score OR Whether There is Another Student Should not be empty Can only be Y or y or N or n If invalid, the user should continually be asked to enter until correct. NOTE: The message should be specific as to whether or not the user should be entering another student or another score. Watch the demo video for further clarification. All of this logic should exist inside a third function Calculating Average All of the logic that determines the average score should exist inside a fourth function. Storing Each students Name and Average Score Each student name must be stored inside an array Each average score for each student must be stored inside a different array For example, after all of the students and their scores are entered, two arrays like the following should have been built dynamically (as in, you dont manually type this inthese arrays are built while the program runs): var students = [Paul, Sarah, Chet]; var scores = [99, 2, 88]; In this example, Pauls average score is 99, Sarahs is 2, and Chets is 88. (Paul is element 0 in both arrays, Sarah is element 1, and Chet is element 2). Displaying the Final Output The output should look like (names and scores may differ): Test Data WATCH THIS DEMO VIDEO The Test data that will be used to ensure the program works is as follows Name Score Score Score Score Paul 100 98 95 100 Sarah 4 8 Chet 88 34 100 o Pauls average should be 98% o Sarahs average should be 6% o Chets average should be 74% I will also be testing that names and scores cannot be left blank I will also be testing that scores are between 1 and 100 inclusive I will also be testing that only Y or y or N or n are valid answers to whether or not I would like to add another score or another student and that the invalid message is specific to whether I was entering a score or a student (Javascript)

The problem is that i need it while looped. please help.

my code:

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

Step: 3

blur-text-image

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

Object Oriented Databases Prentice Hall International Series In Computer Science

Authors: John G. Hughes

1st Edition

0136298745, 978-0136298748

More Books

Students also viewed these Databases questions

Question

What are the pros and cons of expanding into a democratic country?

Answered: 1 week ago