Mr. Tony sells guitar, mandolin and banjo, these three types of musical instrument in his store. He uses a paper-based system to keep track of his instruments. He requires a computer-based system to store his inventory and a new search tool to help him match up his customer’s dream instrument.

A serial number and a price are unique to all the instruments. For musical instrument choice the client provides only the general properties of an instrument and not the unique properties. For example, to choice a guitar, the client gives the name of the builder, model, number of strings, back wood and top wood information. The “type” could be acoustic or electric. The builder could be Fender, Martin, Gibson, Collins, Olson, Ryan, PRS or any other. The back wood or top wood could be made of Indian rosewood, Brazilian rosewood, Mahogany, Maple, Cocobolo, Cedar, Adirondack, Alder or Sitka. The model name for guitar doesn’t have a limited set of values like the builder and wood. Banjos have same properties like guitars.

For mandolin, all the specifications are same except the number of strings. Mandolins normally come with 4 pairs of strings. An extra specification “style” needs to be added with mandolin. Mandolins can come in several styles, like an “A” style or an “F” style.

Design the software for Tony’s store using Object–Oriented principles like Inheritance, Polymorphism, Abstraction and Encapsulation. Draw the class diagram for your design using UML notation and briefly explain your design choices.

Leave a Reply

Your email address will not be published. Required fields are marked *

Mr. Tony sells guitar, mandolin and banjo, these three types of musical instrument in his store. He uses a paper-based system to keep track of his instruments. He requires a computer-based system to store his inventory and a new search tool to help him match up his customer’s dream instrument.

A serial number and a price are unique to all the instruments. For musical instrument choice the client provides only the general properties of an instrument and not the unique properties. For example, to choice a guitar, the client gives the name of the builder, model, number of strings, back wood and top wood information. The “type” could be acoustic or electric. The builder could be Fender, Martin, Gibson, Collins, Olson, Ryan, PRS or any other. The back wood or top wood could be made of Indian rosewood, Brazilian rosewood, Mahogany, Maple, Cocobolo, Cedar, Adirondack, Alder or Sitka. The model name for guitar doesn’t have a limited set of values like the builder and wood. Banjos have same properties like guitars.

For mandolin, all the specifications are same except the number of strings. Mandolins normally come with 4 pairs of strings. An extra specification “style” needs to be added with mandolin. Mandolins can come in several styles, like an “A” style or an “F” style.

Design the software for Tony’s store using Object–Oriented principles like Inheritance, Polymorphism, Abstraction and Encapsulation. Draw the class diagram for your design using UML notation and briefly explain your design choices.

Leave a Reply

Your email address will not be published. Required fields are marked *