Write a JavaScript program to read and analyze the assessment results of a unit under Node.js host environment. The assessment results are read from the keyboard. The input consists of a list of student results. Each student's result includes the student's name and his or her mark for that unit. These results must be stored in one or several arrays. The input ends when the user types "end".
Once all assessment results are read in, your program should produce a table that summarises the number of students in each grade (HD, D, C, P and N) as well as the percentage of students in each grade. Finally, display the name and mark of the best student.
After the summary table and the best student are displayed, your program prompts the user to inquire about a student's mark. For example, if the user enters the name "John", your program should display the names and marks of all students whose names contain the string "John" (ignore the case).
Your program should allow the user to keep making queries until the user types "stop".
Test and run the above program using Node.js only. Do not use a web browser to test and run your program.
Hints: you may use multiple console.logs to output the data in table-like manner. However, it would be difficulty to make the data in the table properly aligned. Alternatively, you may place the data in a JavaScript object and output the object using console.table. Eg:
(where var hd, d, c, p = number of students in each grade and hdp, dp, cp, pp = percentage of students in each grade)
var hd = ;
var d = ;
var c = ;
var p = ;
var hdp = ;
var dp = ;
var cp = ;
var pp = ;
var table = {};
table.HD = { number: hd, '%': hdp };
table.D = { number: d, '%': dp };
table.C = { number: c, '%': cp };
table.P = { number: p, '%': pp };
console.table (table);
In: Computer Science
consider the potential v(y,z) =sinky(Ce^kz + De^-kz)
apply the two boundary conditions
a- V(y,z=b)=0
b- V(y=a,z)=0
In: Physics
The potential difference across a charged capacitor is 22 V. The capacitor discharges through a fixed resistor. After a time equal to the time constant, the potential difference has reduced to V. The magnitude of V is:
In: Physics
In: Physics
A survey of US women with Ph.D.'s was conducted. Of the 102 respondents in marriages or long-term partnerships with men, 57% reported that their spouse/partner also held a doctorate degree.
Construct a theoretical 90% confidence interval. The interval is:
Select one:
a. (49.0%, 64.7%)
b. (48.9%, 65.1%)
c. (47.1%, 66.7%)
d. (47.4%, 66.6%)
e. (44.4%, 69.6%)
Based on the interval in the previous question, what group(s) can we make a conclusion about?
Select one:
a. All US women
b. All US women with Ph.D.'s
c. All US women with Ph.D.'s who are married
d. All US women with Ph.D.'s who are married or in long-term partnerships
e. All of the above
f. None of the above
The sociologists reporting on this study stated that: "There is strong evidence (p<0.001) that women in opposite-sex partnerships are more likely than women in same-sex partnerships to have a partner with the equivalent level of education." What type of error might the sociologists have committed?
Select one:
a. Type I
b. Type II
c. Neither error is possible
d. Both errors are possible
In: Statistics and Probability
The governing group of student-athletes on campus consists of six elected representatives from the various teams. Two of this year's group are female student-athletes. The athletic director plans to randomly select a subcommittee of 3 members to study and make recommendations about adding field hockey as a women's sport. The composition of the subcommittee is of some interest. The six students are Adam, Bob, Christopher, Doug, Elsa, and Frannie.
a. List all the simple events in this experiment. (Example: ABC, ABD, ABE etc)
b. Compute the probabilities of the following events of interest:
i: {both females are selected}
ii: {At least one female is selected}
iii: {No female is selected}
In: Statistics and Probability
Consider the following requirement someone developed
for a particular system, and then answer the three questions at the
bottom.
"Students must be able to see a list of all subjects being offered in a given year and be able to select the ones that interest them so that they can enrol for the next year of study, and if they don’t do it before a particular date then they will have to miss out and try in another semester because the class might be too full, but pre-requisites have to be satisfied."
a) Is this requirement concise? Give reasons for your
answer.
b) Is this requirement atomic? Give reasons for your answer.
c) Is this requirement testable? Give reasons for your answer
In: Computer Science
Consider the following requirement someone developed for a particular system, and then answer the three questions at the bottom. "Students must be able to see a list of all subjects being offered in a given year and be able to select the ones that interest them so that they can enrol for the next year of study, and if they don’t do it before a particular date then they will have to miss out and try in another semester because the class might be too full, but pre-requisites have to be satisfied."
a) Is this requirement concise? Give reasons for your answer. b) Is this requirement atomic? Give reasons for your answer. c) Is this requirement testable? Give reasons for your answer.
In: Computer Science
( X, τ ) is normal if and only if for each closed
subset C of X and each open
set U such that C ⊆ U, there exists an open set V satisfies C ⊆ V
⊆clu( V) ⊆ U
In: Advanced Math
Simon spends his income, $100, on food (f) and video games (v) with prices pf= 7 and pv = 1. Assume that f ≥ 0, v ≥ 0. His preferences are given by u(f, v) = f^0.7 *v^0.3 . Paul’s Marshallian demand is . (a) (11, 23) (b) (5, 65) (c) (10, 30) (d) (10, 25)
In: Economics