Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

158.326  Software Construction

Tutorials 3

Create a class diagram based on the following case scenario. Next, implement the class diagram by creating C# project of Windows Forms App using Microsoft Visual Studio 2022.

Alternately, you can also choose to create an ASP.NET Core Empty project and apply MVC architectural pattern to your implementation – this is optional

CASE

There are many different types of testing stations nationwide for conducting vehicle inspections.    Each testing station has a registered name, an address and a contact telephone number. Some of the testing stations which conduct car and truck inspections are VTNZ, DriveSafe, NZ- WoF, and  AA.

You have to design an application for car inspections done by VTNZ testing station.

VTNZ offers many services for inspections. Different service types and prices apply for car and truck inspections. For car inspections, the service type and service price are given in Table 1.

Table 1

Service Type

Service Price

WoF inspection

$ 50.00

Modified vehicle check-up

$ 200.00

Pre-purchase inspection

$ 150.00

Certificate of Fitness

$ 210.00

Part A:

Name each class

1.

__________________

2.

__________________

3.

__________________

4.

__________________

How many abstract classes do you have? _____________________

How many are interfaces do you have? ______________________

How many concrete classes?  ______________________

Draw the class diagram, showing the relationship between them.

Hint:  The class diagram is similar to the example done in class. You should use all OO concepts covered in class (i.e., inheritance, wrapper/ interface and association) for a flexible design which can be extended.

NOTE:  Use proper naming conventions e.g. use camelCase, prefix private fields with _ and prefix protected fields with z.

Part B:

Create a new project in Visual Studio and implement the design using the class diagram identified in Part A.

Further, note that VTNZ wants to keep track of the total number of inspections carried out and the total price for them.

To illustrate this screen shots on the following pages show you

(1) the basic form design,

(2) what will be displayed after the FormLoad event,

(3) what will be displayed after one inspection is requested and

(4) what will be displayed after two inspections are requested.

Hints:  The implementation will be similar to the example demonstrated in class.

You will have to use shared/static fields/properties/methods to show summary information - ‘Total Number of Inspections Requested’ and ‘Total Price for all Inspections Requested’ .