Starting from:

$25

CS213-Lab 3 Solved

CS-213 : Lab 3 : JavaScript Functions, Objects and Arrays

1. calculator.html

Develop a calculator with basic functions like addition, subtraction, multiplication, division. One should be able to clear the values also, so that it is reusable.

For this we are expecting six (activity buttons) : addition, subtraction, summation of numbers up to n, multiplication of numbers up to n, = (to see the result of any calculation), and clear button(to clear the data, this may have different name).

Other buttons are for ten digits : 0-9; in total 4 + 10 + 2 = 16 buttons, if you want more you can use it.

Check if the calculations are correct for at least 4 digit numbers. What we are looking for is, we should be able to do a sequence of computations like this 123 + 456 − 456 − 32 − 2 + 12.

Associativity of operators should be correct.

1

2.    Create a webpage that takes a string as input, on button click, computesthe most frequently occuring character and displays the output in the following format:

Input: a,b,a,c,a,g,a,d,a,r,a,f,a,u Output:

Most Frequent character: a Number of occurences: 7

3.    Develop a web-page to perform the following:

(a)    Accept the details of the User : Name, Address, Phone Number,Email ID, Educational Qualifications, Age, using suitable input elements.

(b)    On clicking submit button, call function display().

(c)    Design the function display() such that , it will show the submittedinformation in a table, in the following format:

User.Name:
Kumar
User.Address:
FirstStreet
User.Phone Number:
9999999999
User.EmailID:
kumar@gmail.com
User.Educational Qualifications:
B.Tech
User.Age:
19
Create class User with properties as mentioned above, and function display().

2

More products