Question: Interfaces and Abstract classes VBA (my already written code will be provided as a reference.) Requirements: - Add an interface to the project called IMusic.

Interfaces and Abstract classes VBA

(my already written code will be provided as a reference.)

Requirements:

- Add an interface to the project called IMusic. It contains properties for Title and Artist

- Add an interface to the project called IRetailItem. It contains properties for UPC and InventoryCount

- Add a class to project called StoreItem. The class needs to be declared as abstract (MustInherit). The class has a property for Price. The constructor intitializes the Price property with a parameter value.

- Add a class called, CompactDisc

* The class inherits StoreItem

* The class implements IMusic and IRetailItem. After implementing the interfaces, add private member variables that are used in the Getters and Setters

* The constructor should initialize the member variables to the parameter variables. Don't forget the base class constructor!

Public Interface IRetailItem

Property UPC() As String Property InventoryCount() As String

End Interface

Public Interface IMusic

Property Title() As String Property Artist() As String

End Interface

Public MustInherit Class StoreItem

Public mPrice As Decimal

Public Sub New(ByVal pPrice As Decimal)

Me.mPrice = pPrice

End Sub

End Class

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!