Example #1
0
        private void btnFindGuitar_Click(object sender, EventArgs e) {
            Inventory inventory = new Inventory();

            initialInventory(inventory);

            Guitar myGuitarLikes = new Guitar(null, 0.0, "gibson", null, null, null, null);

            Guitar guitar = inventory.search(myGuitarLikes);

            if (guitar != null) {
                displayGuitarInfo(guitar);
            } else {
                displaySorryMessage(myGuitarLikes);
            }
        }
Example #2
0
 private void initialInventory(Inventory inventory) {
     inventory.addGuitar("1", 1999.95, "Finder", "F1000", "Acoustic", "Indian Rosewood", "Indian Rosewood");
     inventory.addGuitar("2", 1499.95, "Gibson", "GA101", "Electric", "Maple", "Alder");
     inventory.addGuitar("3", 1799.00, "Ryan", "R1A01", "Acoustic", "Alder", "Indian Rosewood");
 }