Modify the program to ask the user for an employee number


Option Explicit On
Option Strict On 
Module Module1
   Sub Main()
      Dim Name As String
      Dim GrossString As String
      Dim Gross, Deduct, Net As Double
      Const RATE As Double = 0.25 
      Const QUIT As String = "XXX"
      Const REPORT_HEADING As String = "Payroll Report"
      Const END_LINE As String = "**End of report"

      'Work done in the housekeeping() procedure
      System.Console.WriteLine(REPORT_HEADING)
      Name = InputBox$("Enter employee's name: ")
      While(Name <> QUIT)
         'Work done in the detailLoop() procedure
         GrossString = InputBox$("Enter employee's gross pay: ")
         Gross = Convert.ToDouble(GrossString)
         Deduct = Gross * RATE
         Net = Gross - Deduct
         System.Console.WriteLine("Name: " & Name)
         System.Console.WriteLine ("Gross Pay: " & Gross)
         System.Console.WriteLine ("Deductions: " & Deduct)
         System.Console.WriteLine ("Net Pay: " & Net)
         Name = InputBox$("Enter employee's name: ")
      End While
      'Work done in the endOfJob() procedure
      System.Console.WriteLine(END_LINE)
   End Sub
End Module

Modify the program to ask the user for an employee number which will be a numeric value such as 3234 with no decimals. Also prompt the user to enter in bonus pay. Since this is a monetary amount,make sure the user can enter values with a decimal point such as 30.45. Currently the Net is set to be equal to the Gross minus the Deduct. Modify this so that the Net is set equal to the Gross minus Deduct plus the Bonus amount. Also change the program to display the employee number as well as the bonus amount for the user along with the other report data. 

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Modify the program to ask the user for an employee number
Reference No:- TGS02832859

Now Priced at $10 (50% Discount)

Recommended (97%)

Rated (4.9/5)