Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASSIGNMENT INFORMATION Points Possible 100 Use ConsultantCharges.java 1. Add another charges for upper level consultant as follow a. Input the hours for the upper level

image text in transcribed
image text in transcribed
ASSIGNMENT INFORMATION Points Possible 100 Use ConsultantCharges.java 1. Add another charges for upper level consultant as follow a. Input the hours for the upper level consultant b. Make sure that the hours are at least 3 hours c. Upper level consultant charges = 70 * hours 2. Add another charges for worker as follow a. input the hours for the worker b. Make sure that the hours are at least 7 hours c. Worker charges = 15* hours 3. Print the charges for the consultant, upper level consultant, and worker ConsultantCharges.java This program demonstrates the conditional operator. +/ import javax.swing.JOptionPane; // Needed for JOptionPane public class Consultant charges { public static void main(String ( args) public double hours, // To hold the hours worked charges; // To hold the charges String input) // To hold user input // Get the number of hours worked. input - JoptionPane.showInputDialog("How many hours were worked?); hours - Double.parseDouble(input); // Make sure hours is at least 5. 11 In the following statement, if the value in hours is less 1/ than 5, then 5 is stored in hours. Otherwise hours is assigned // the value it already has. hours - hours

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

Spatial Databases A Tour

Authors: Shashi Shekhar, Sanjay Chawla

1st Edition

0130174807, 978-0130174802

More Books

Students also viewed these Databases questions