Академический Документы
Профессиональный Документы
Культура Документы
Question No. 1
Write a Java program (after declaring class and main () method) which calculates weekly income of a worker.
Assume worker works for 40 hours in a week and his hourly income is 15 $. The output of the program
should be exactly as shown below. The value of weekly, annual and monthly income should be calculated
in variables and printed at _______ in the output shown below. There are 52 weeks and 12 months in a
calendar year. This information could be used to calculate the values shown below. The program should
compile without errors if compiled on NetBeans.
Output
My hourly income is = 15 $
Specifications
• Declare hourly income and number of hours per week as variables and print first statement in output
using values in these variables. (Marks 3)
• Declare and calculate weekly, annual and monthly income in variables and print second statement
of output. (Marks 4)
Page 1 of 3
PURES COLLEGE OF TECHNOLOGY
package Salary;
Page 2 of 3
PURES COLLEGE OF TECHNOLOGY
My hourly income is = 15 $
Page 3 of 3