Client Billing Write an application that tracks the amount of billable time that the user spends on consulting projects. The application reads an input client file and appends information to a billing...


Client Billing


Write an application that tracks the amount of billable time that the user spends on consulting projects. The application reads an input client file and appends information to a billing file, which it creates the first time it runs.


Startup Form


Figure 1-24 shows a sample of the main window. When the user begins working on a project, the client name is selected from a ComboBox control. In Figure 1-25, the user has clicked the Start button, so the billing timer is running. Notice that the Start button is disabled. In Figure 1-26, the user has clicked the Stop button. At that moment, the application shows the amount of elapsed time and writes a record to the billing file.


Coordinate the command buttons carefully to make sure the user cannot click out of sequence. The following table shows the two possible program states that affect the buttons. The program is in State 1 when it starts; after clicking the Start button, the program enters State 2. When the Stop button is clicked, the program returns to State 1.


When the user clicks the Start button, display a status message Billing in Progress ... to show that the clock is running. Do not permit the user to select a different client while the clock is running. When the Stop button is clicked, display the stop time and the number of billable hours and minutes. The name of the selected client should appear in the window caption.


TimeClock Class


Create a class named TimeClock that encapsulates the time-related calculations performed by the program. Use a TimeSpan object to hold the difference between two DateTime values. The following table lists the TimeClock properties:


The following table lists the TimeClock methods:


BillingData Class


Create a class named BillingData to handle the client and billing files. Use the Visual Studio editor to create the client file. Insert at least five records in the client file before running the program. Each record in the client file contains a client name. Your program will create the billing file the first time it runs. Subsequent runs will append to the file. Each record in the billing file contains the following fields: billing date, client name, start time, stop time, and elapsed time. The following is a sample record: 02-01-2003,Jones and Smith,21:51,22:10,1:19

Nov 17, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here