Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please code in C# Fragrance Data File An external data file will be used in this phase of the project for loading data externally into

Please code in C#

Fragrance Data File

An external data file will be used in this phase of the project for loading data externally into the application. The data contains information about the fragrances used for the interior car wash service. This file must be located in the same directory as the applications assembly. DO NOT alter the structure of this file. Hawaiian Mist,2.75 Baby Powder,1.5 Country Floral,2.25 Pina Colada,.75 Vanilla,2.0

Main Form

Opening an instance of the Car Wash Form was completed in the previous version of the project. You will not update anything in the Main Form for this phase of the project.

Car Wash Form

Programming Requirements:

1. The functionality of this form must be written in a way that allows for changes to the external data (date file(s)) without having to update the code that uses the data.

2. Do not use Form Designer to load data into the list controls.

3. The data for Packages (including interior and exterior) can be hard coded in the Form class. The Packages data will be stored in collection(s) during the construction of the Form object.

4. The Fragrance data will be read in from the provided file.

5. You may use the ACE.BIT.ADEV.CarWash.CarWashItem structure and ACE.BIT.ADEV.CarWash.Package to complete this assignment.

Form Design:

The design of the Car Wash Form was completed in the base class. You will need to set the initial state of the Form and include the functionally described below. Your derived Car Wash Form class will have access to all the necessary base class fields to reference the Forms controls.

Initial State

1. The form will have the following initial state:

2. The title of the form is Car Wash.

3. The Generate Invoice menu item is disabled.

4. The Form size matches the screenshot below.

5. The Package is populated with package data from collections in your code (see Packages and Prices section). Text cannot be entered into this control.

6. The Fragrance ComboBox is populated with data from the fragrances data file. The items in the ComboBox will be displayed in alphabetical order. Text cannot be entered into this control.

7. The Package ComboBox has no item selected.

8. The Fragrance ComboBox has Pine selected.

9. The ListBox controls in the Services Group Box contain no items.

10. The Subtotal, Taxes and Total output labels are blank, as there is no Car Wash Invoice instance when the Form is initialized.

11. The Labels are formatted as:

a. Subtotal: Currency

b. PST: Number to two decimal places

c. GST: Number to two decimal places

d. Total: Currency image text in transcribed Car Wash Form Initial State image text in transcribed Car Wash Form Initial State - Packages image text in transcribed

Car Wash Form Initial State - Fragrances

Data Binding

The following controls on the form must be data bound:

1. Package ComboBox

2. Fragrance ComboBox

3. Interior ListBox

4. Exterior Listbox

5. Subtotal, GST, PST, Total output Labels

Car Wash Form Functionality

Errors Before the Form is Shown

When an error occurs before the form is shown, a dialog message is shown and the form is closed.

When the fragrance data file does not exist at the intended path, display the following MessageBox: image text in transcribed If any other exception occurs while loading the data from the file, display the following MessageBox: image text in transcribed

Inputs

When a customer makes an appointment for a car wash service, the Car Wash Form is used for determining payment and invoicing. The form has two inputs:

Package ComboBox

The package the customer chooses for their car wash will be selected by the user using the ComboBox control labelled Package. The package ComboBox is an input control for the price of the package and is also used to determine the interior and exterior services performed during the car wash. The interior and exterior services are output to the ListBox controls.

When an item is selected in this control, the following must happen:

1. Update the ListBoxes in the Services GroupBox. The tables below outline the items to be included in the ListBoxes for each package selection.

2. Update the subtotal, taxes charged (GST and PST) and total output Labels on the Form.

3. Enable the Generate Invoice menu item.When a Package is selected, a car wash invoice is created and the Subtotal, Provincial Sales Tax Charged, Goods and Services Tax Charged and Total are output to the appropriate Labels. All subsequent selections will update the car wash invoice and thus update the output Labels.

Package: Package: Package: Fragrance: Data File Error Fragrances data file not found. Data File Error An error occurred while reading the data file. Package: Package: Package: Fragrance: Data File Error Fragrances data file not found. Data File Error An error occurred while reading the data file

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

Auditing And Assurance Services Plus Pearson MyLab Accounting With Pearson EText

Authors: Alvin A. Arens, Randal J. Elder, Mark S. Beasley, Chris E. Hogan

17th Global Edition

1292312106, 978-1292312101

More Books

Students also viewed these Accounting questions

Question

Is conflict always unhealthy? Why or why not? (Objective 4)

Answered: 1 week ago