Part 1.

Create a person class.

Include FirstName, LastName as read only properties. Set at instantiation via constructor only.

Include PhoneNumber property that is read-write

Create a derived class called Customer that implements additional properties of Customer ID and Password as read only properties. This class should override the constructor to set a password from the user (parameter) and create a random CustomerID using the following code sample:

Math.Ceiling( Rnd() * 20 )

Create a form that tests this.

Part 2.

Create a shopping cart class that implements the following properties:

  • CustomerID
  • ItemsTotalCost
  • ShippingCost

If a Customer object is created using the class definition from Part 1, allow the user to create a shopping cart class object and set the CustomerID to current customer.

Create an class event that shows a message and sets a fixed shipping cost of $10, if ItemsTotal is less that $35

Create an class event that gives a 10 % discount if the total is over $100

Create a form that tests this. The form should have:

  • a listbox to hold the items and calculate the total of the cart.
  • Text boxes to add items to the listbox.
  • Labels that show customer info (ie name and CustomerID)
  • Label that shows the Total of Cart.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.