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

  1. 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

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!