Question: Develop a Command Line Swift Program for a Music Store. The program needs the following input data: Music Music Name Music Artist Price Available Quantity
Develop a Command Line Swift Program for a Music Store. The program needs the following input data:
Music
- Music Name
- Music Artist
- Price
- Available Quantity
[Please note the music should have a unique id]
Customer
- Customer Name
- Customer Email
[Please note the customer should have a unique id]
Order
- Music
- Customer
- Date of Order
- Total Price of Order
The program should do the following:
Customer
- Add Customer Details
- Delete Customer
- Display all Customers
Music
- Add Music
- Update Music Details
- View all Music with quantities available
- Search Music by id, name and artist
Order
- Create order for a specific customer
- Delete Order
- View all Orders
- While creating an order keep in mind the available quantity of Music
Note: The purpose of this assignment is to practice Swift constructs (classes, instances, properties etc). The evaluation of your solution will take this in consideration.
Note2: You can create an extension to the String type to add a method to read from standard input (i.e. console). You can use the Swift standard library function: readLine() to read a string.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
