Few javascripts, easy

chwqb28
timer Asked: Aug 26th, 2015

Question Description


Unformatted Attachment Preview

Your program is to calculate a consultant's invoice to their client. The consultant charges $85 per hour, however there is a minimum of 5 hours to be billed regardless of the hours worked. Read the amount of hours worked from the keyboard and calculate what the invoice total will be. You are to use the ternary if statement to perform this calculation. Page name: consultant.html Decision structure: ternary or conditional operator 4. Test a logical OR condition Your program is to read in 2 results indicating whether the result is a pass or a fail. The user need only pass one of the tests in order to be considered competent. You are to use the logical "OR" operator to determine their competence. Display a message indicating whether they are competent or not yet competent. 8. Test the switch statement using a single case Your program is to prompt the user to enter X, Y or Z. Use a switch statement to display the appropriate message: You entered X, You entered Y, or you entered Z. Page name: Switch SingleCase.html Decision structure: switch statement Page name: LogicalOr.html Decision structure: if-else using 11 9. Test the switch statement using mixed case Your program is to read a price code from the user and display the appropriate price per kilogram according to the following table:- Price Code A B с Price / kg $1.50 $2.85 $5.60 5. Test a logical AND condition Your program is to read in 2 results indicating whether the result is a pass or a fail. The user must pass both of the tests in order to be considered competent. You are to use the logical and operator to determine their competence. Display a message indicating whether they are competent or not yet competent. Page name: LogicalAnd.html Decision structure: if-else using && 6. Test a logical NOT condition Your program is to read in the age from the keyboard. If the age is not less than 18 you are to display a message informing the user that they are eligible to enroll to vote. Page name: LogicalNot.html Decision structure: if-else using "!" operator You program should also accept the price code in lower case. The output should be formatted to be displayed as currency. Class name: Switch MultiCase.html Decision structure: switch statement End of documenti 7. Test the ternary if statement
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Related Tags

Brown University





1271 Tutors

California Institute of Technology




2131 Tutors

Carnegie Mellon University




982 Tutors

Columbia University





1256 Tutors

Dartmouth University





2113 Tutors

Emory University





2279 Tutors

Harvard University





599 Tutors

Massachusetts Institute of Technology



2319 Tutors

New York University





1645 Tutors

Notre Dam University





1911 Tutors

Oklahoma University





2122 Tutors

Pennsylvania State University





932 Tutors

Princeton University





1211 Tutors

Stanford University





983 Tutors

University of California





1282 Tutors

Oxford University





123 Tutors

Yale University





2325 Tutors