HTML/JavaScript Web Application Answers

Questions: 680

Answers by our Experts: 648

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Write a javascript program do-while loop that asks the user to enter two numbers. The numbers should be added and the sum displayed. The loop should ask the user whether he or she wishes to perform the operation again. If so, the loop should repeat; otherwise it should terminate

SERIES OF OPERATIONS


myArray of numbers, write a JS program to perform the following steps and log the result.


Multiply each value with 9.


Subtract 20 from each value.


Multiply each value with 7.


Log the values of the resulting array separated by a space.


Input


The input will be a single line containing an array myArray


Output


The output should be a single line with values separated by a space


Constraints


Each value in the array must be a number


Sample Input


[ 12, 2, 2, 4, 1 ]


Sample Output


616 -14 -14 112 -77


Given two boolean values

isGrassTrimmerFound and isWaterHosePipeFound as inputs, create three JS promises using async/await and try/catch blocks.

Input

The first line of input contains a boolean isGrassTrimmerFound

The second line of input contains a boolean isWaterHosePipeFound

Sample Input 1

true

true

Sample Output 1

Grass Trimmed

Garden Cleaned

Watered Plants

Sample Input 2

true

false

Sample Output 2

Grass Trimmed

Garden Cleaned

Water Hose Pipe Not Found


"use strict";

/* Please do not modify anything above this line */

function main() {

const isGrassTrimmerFound = JSON.parse(readLine());

const isWaterHosePipeFound = JSON.parse(readLine());


/* Write code */

const myPromise = async () => {

try {

/* Write code */

} catch(error) {

/* Write code */

}

};

myPromise();

}


InstructionsPerform the following items. Mobile users may write their answers on a clean sheet of paper. (8 items x 5 points)

  1. Create a constructor named Exam that assigns "Good luck" to a previously declared String variable named message.
  2. Create an empty overloaded constructor for the Exam class with two (2) String parameters named period and level.
  3. Declare a double-type accessor named getPrice that returns the value of price.
  4. Declare a boolean-type accessor named isFinished that returns the value of status.
  5. Declare a class named Midterm that inherits from the class named Exam.
  6. Create three (3) class declarations to show multiple levels of inheritance. Use the classes named Exam, Midterm, and Essay.
  7. Create a constructor named Midterm that prints "Exam has started." using println(). Its first statement should be a call to a constructor in the parent class.
  8. Given the base class named Quiz and the derived class named Essay, write a statement to show inheritance between these classes.

Hi, I am developing a judging system for the upcoming beauty pageant at school. I am using Visual Studio Code editor, with a firebase framework. I'm also using HTML, Javascript. And I'm using Cloud Firebase database, the free trial. My question is how do I create a system that will allow users to enter multiple scores for one contestant but assume that there will be at least one score entered and average is calculated for each contestant. The scores must be submitted to the database and determine the winner with the highest score and the top 3. Please help me and submit answer to my Email plz.


Final Value with Appreciation


Given principal amount


principal as an input, time period in years time and appreciation percentage apprPercentage as optional inputs, write a JS function to return the final value finalValue with the given appreciation percentage and time period. The default values for time and apprPercentage are 2 and 5 respectively.


Quick Tip


The formula to calculate the final value with appreciation is,


finalValue = principal * (1 + time * appreciation / 100)


Input

The first line of input contains a number principal

The second line (optional) of input contains a number time

The third line (optional) of input contains a number apprPercentage

Output

The output should be a single line containing the finalValue

Sample Input 1


1000


2


3


Sample Output 1


1060


Sample Input 2


3000


Sample Output 2


3300.0000000000005




Search Item in a Mart


Given an array


mart of objects in the prefilled code and categoryOfItem, item as inputs, create a JS promise, resolve with "Item Found" text, if the


categoryOfItem matches with the category and the corresponding items list includes the itemreject with "Category Not Found" text, if the


categoryOfItem does not match with any catergory in the martreject with "Item Not Found" text, if the


items list does not include item Use async/await and try/catch blocks.






Quick Tip


You can use array methods find() and includes().


Input

The first line of input contains a string categoryOfItem

The second line of input contains a number item

Output

The output should be a single line string with the appropriate message

Sample Input 1


pulses


green gram


Sample Output 1


Item Found


Sample Input 2


detergents


tide


Sample Output 2


Category Not Found


Submarine

Given two numbers

totalTorpedos, torpedosFired as inputs, write a super class Submarine with property and methods as below,PropertyDescriptionisSubmergedIt should contain a boolean value to indicate whether the submarine is submerged or not.....

The sequence of operations is,

  1. Submerge the Submarine
  2. Fire torpedos
  3. Surface the Submarine

Input

  • The first line of input contains a number totalTorpedos
  • The second line of input contains a number torpedosFired

Output

  • The first line of output is a string with Submarine Submerged text
  • The second line of output is a string with the number of torpedos fired and left, as shown in sample outputs
  • The third line of output is a string with Submarine Surfaced text

Sample Input 1

5

2

Sample Output 1

Submarine Submerged

2 Torpedos Fired, 3 Left

Submarine Surfaced

Sample Input 2

10

2

Sample Output 2

Submarine Submerged

2 Torpedos Fired, 8 Left

Submarine Surfaced


Area and Circumference of a Circle


Given radius


radius of a circle, write a JS constructor function with the methods getArea and getCircumference to calculate the area and circumference of the circle.


Note

The value of π = 3.14

Quick Tip


Use the formulae to calculate,


Area of circle = π * radius * radius

Circumference of circle = 2 * π * radius

Input

The input will be a single line containing a number radius

Output

The first line of output should contain the area of the circle

The second line of output should contain the circumference of the circle

Sample Input 1

7

Sample Output 1

153.86

43.96


Sample Input 2

25

Sample Output 2

1962.5

157



totalTorpedos, torpedosFired as inputs, write a super class Submarine with property and methods as below,PropertyDescriptionisSubmergedIt should contain a boolean value to indicate whether the submarine is submerged or not.


MethodDescriptiondiveWhen this method is called, it should set the value of isSubmerged to true and log "Submarine Submerged" text in the console.surfaceWhen this method is called, it should set the value of isSubmerged to false and log "Submarine Surfaced" text in the console.


Add a sub class weaponUnit which extends to Submarine with the below properties and methods,


The sequence of operations is,


Submerge the Submarine

Fire torpedos

Surface the Submarine

Sample Input 1


5


2


Sample Output 1


Submarine Submerged


2 Torpedos Fired, 3 Left


Submarine Surfaced


Sample Input 2


10


2


Sample Output 2


Submarine Submerged


2 Torpedos Fired, 8 Left


Submarine Surfaced


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS