Experiment - 1.2: Design and Implement A Simple Inventory Control System For A Small Video Rental Store
Experiment - 1.2: Design and Implement A Simple Inventory Control System For A Small Video Rental Store
2
Design and implement a simple inventory control system for a small video
rental store
Student Name: UID:
Branch: Section/Group
Semester: Date of Performance:
Subject Name Subject Code:
Design and implement a simple inventory control system for a small video
rental store
2. Task to be done:
Make a simple inventory control system for a small video rental store
Jdk, vsCode
4. Algorithm/Flowchart (For programming based labs):
1. start
2. make a class with name Video. In this class make variable related to video.
3. make a class with name VideoStore. In this class functions are made for add video, rent
video, return video. Etc….
4. make a main class with name VideoStoreLauncher. In this class we call all the function with
object of the class.
5. End.
5. Code:
int avgrating;
{
return checked;
}
}
{
checked = true;
}
{
if (avgrating > 0)
{
return avgrating;
} else {
return 0;
}
}
{
this.title = title;
v[i].title = title;
i++;
}
{
{
if (v[k].title.equalsIgnoreCase(title)) {
if (v[k].checked()) {
v[k].rent();
System.out.println("Video is rented");
}
else {
}
}
}
}
if (i == 0)
{
}
{
if (v[k].title.equalsIgnoreCase(title)) {
v[k].checked = true;
}
}
}
{
if (i == 0) {
}
else {
{
System.out.println("Enter the rating for movie" + v[k].title);
v[k].avgrating = ob.nextInt();
}
}
}
if (i == 0)
{
}
else
{
{
}
}
}
}
c. Code of VideoStoreLauncher class
import java.util.Scanner;
do {
System.out.println("=========Menu=========");
ch = s.nextInt();
do {
switch (ch)
{
case 1:
System.out.println("1. List Inventory");
uCh = s.nextInt();
if (uCh == 1)
{
vs.listInventory();
}
else if (uCh == 2)
{
vs.listInventory();
title = s.next();
vs.checkOut(title);
}
else if (uCh == 3) {
vs.receiveRating();
}
else if (uCh == 4)
{
vs.rent();
}
else
{
}
break;
case 2:
aCh = s.nextInt();
if (aCh == 1)
{
vs.listInventory();
}
if (aCh == 2)
{
title = s.next();
vs.addVideo(title);
}
break;
default:
System.out.println("Sorry Wrong Choice");
}
choice = s.next();
} while (choice.equalsIgnoreCase("yes"));
} while (choice.equalsIgnoreCase("yes"));
}
2. Approach the programming tasks using techniques learnt and write pseudo-code.
3. Choose the right data representation formats based on the requirements of the problem.
4. Use the comparisons and limitations of the various programming constructs and choose the right one for
the task.
Evaluation Grid (To be created as per the SOP and Assessment guidelines by the faculty):