Averagerating Checked Videoname: Import Class Int Boolean True Void
Averagerating Checked Videoname: Import Class Int Boolean True Void
*;
class Video
{
int averageRating;
boolean checked=true;
String videoName;
void rent()
{
}
void getRating()
{}
void checked() {}
void returned() {}
}
}
void recieveRating(String name,int rating) {}
void returnedVideo(String name){}
void inventoryList()
{
if(inventorylist.length<=0)
System.out.println("List is Empty");
else
{
for(i=0;i<inventorylist.length;i++)
{
System.out.println("Video name"+inventorylist[i]+"\trating
"+averageRating);
}
}
}
}
public class VideoRentalInventorySystem
{
public static void main(String []args)
{
String videoname;
VideoStore vs1=new VideoStore();
Video v1=new Video();
System.out.println("Are You A User or Admin?\n1.U for User \n2.A for Admin.");
Scanner sc=new Scanner(System.in);
char ch=sc.nextLine().charAt(0);
if(ch=='U')
{
System.out.println("ENTER YOUR CHOICE:\n1.Display Inventory List\n2.rent
video\n3.give rating\n4.return the video\n5.exit\n");
int choice1=sc.nextInt();
switch(choice1)
{
case 1:
break;
case 2:
break;
case 3: break;
}
}
else if(ch=='A')
{
System.out.println("ENTER YOUR CHOICE:\n1.Display Inventory List\n2.Add
video\n3.Exit\n");
int choice2=sc.nextInt();
switch(choice2)
{
case 1:vs1.inventoryList();
break;
case 2:System.out.print("enter the name of video");
videoname=sc.next();
vs1.addVideo(videoname);
break;
case 3: break;