Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C Sharp Windows Form: Expand the T-Shirt program to include styles and different departments. Utilize the t-shirt order form class as a parent class,

In C Sharp Windows Form:

Expand the T-Shirt program to include styles and different departments. Utilize the t-shirt order form class as a parent class, and create two child classes for men's t-shirts and women's t-shirts.

The men's styles can now include:

Tank-Top Athletic Shirt - 2$ discount Long-Sleeved - 5$ additional cost The women's styles now include:

Fitted V-Neck - 3$ additional cost Baseball Sleeves - 6$ additional cost The children's styles include:

Onesie for infants - 4$ discount All options come in the same sizes as the regular t-shirt.

Add a column to the list view to display the style options and add it to the receipt. Use appropriate user interface controls to allow the user to select the different options. I suggest creating a tab-page for each department.

Suggested Class Descriptions A suggested class heirarchy for this program is:

TShirtOrder Class: This is an abstract class that represents a TShirtOrder. It's UML diagram is as follows:

Public Properties:

Price - a virtual property that contains a getter that returns the quantity multiplied by the price of the shirt, based on the size. It is designated virtual so that it can be overriden in the child classes where the price may be calculated differently based on different style options. ShirtColor - A Color value that represents the color of the shirts in this order. ShirtQuantity - The number of this type of shirt in the order. ShirtSize - The size of the shirts in this order. StyleDescription - An abstract public property that returns a string to represent any additional stylings of the shirt so they can be displayed in the listview. The base class has no style by default. The child classes have additional style options such as tank top or long sleeves. NOTE: The enum for Size and the Dictonary for prices have been moved to a new static class named Globals.cs.

MensTShirtOrder Class

The MensTShirtOrder Class is a child class of TShirtOrder. It has all the properties of the parent class by default, and it overrides two properties:

Price - If a regular t-shirt is ordered, the base class's calculation is used to calculate the price, otherwise, the style features are included in the price. StyleDescription - This abstract property is included and the getter will return a string to represent the appropriate style description for display in the ListView based on the style selected for this order. It has the following properties of its own.

IsTankTop - A boolean property to indicate whether or not the shirts in this order are tank tops. IsLongSleeved - A boolean property to indicate whether or not the shirts in this order have long sleeves. A shirt cannot simultaneously be long sleeved and a tank top.

WomensTShirtOrder Class

The WomensTShirtOrder Class is a child class of TShirtOrder. It has all the properties of the parent class by default, and it overrides two properties:

Price - If a regular t-shirt is ordered, the base class's calculation is used to calculate the price, otherwise, the style features are included in the price. StyleDescription - This abstract property is included and the getter will return a string to represent the appropriate style description for display in the ListView based on the style selected for this order. It has the following properties of its own:

IsVNeck - A boolean property to indicate whether or not the shirts in this order are VNecks. IsLongSleeved - A boolean property to indicate whether or not the shirts in this order have long sleeves. A shirt CAN simultaneously be long sleeved and a VNeck.

ChildrensTShirtOrder

The ChildrensTShirtOrder Class is a child class of TShirtOrder. It has all the properties of the parent class by default, and it overrides two properties:

Price - If a regular t-shirt is ordered, the base class's calculation is used to calculate the price, otherwise, the style features are included in the price. StyleDescription - This abstract property is included and the getter will return a string to represent the appropriate style description for display in the ListView based on the style selected for this order. It has the following properties of its own:

IsOnesie - A boolean property to indicate whether or not the shirts in this order are Onsies. A shirt CANNOT be simultaneously a onsie and a tshirt.

Add all the t-shirt orders to the same list. Thanks for the help.

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_2

Step: 3

blur-text-image_3

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

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions