Experiment 2: Aim/Overview of The Practical
Experiment 2: Aim/Overview of The Practical
Design and implement a simple inventory control system for a small video rental store
2. Code:
package com.gaurav;
import java.util.Scanner;
class Video {
public String title;
public boolean checked = true;
int avgRating;
case 2:
System.out.println("1. List Inventory");
System.out.println("2. Add Video");
aCh = s.nextInt();
if (aCh == 1) {
vs.listInventory();
}
if (aCh == 2) {
System.out.println("Enter the name of
Video");
title = s.next();
vs.addVideo(title);
}
break;
default:
System.out.println("Sorry Wrong Choice");
}
System.out.println("Do you want to repeat yes/no");
choice = s.next();
} while (choice.equalsIgnoreCase("yes"));
System.out.println("Want to Return to main Menu yes/no");
choice = s.next();
} while (choice.equalsIgnoreCase("yes"));
}
}
3. Output:
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):