import java.util.Scanner;
//solving product problems
public class Main {
public void SearchP() {
System.out.println("Searching the product!");
}
public void SaveP() {
System.out.println("The product saved successfully!");
}
public void UpdateP() {
System.out.println("The product has been updated");
}
public void DeleteP() {
System.out.println("The product deleted!");
}
public void DisplayMenu() {
System.out.println("Displaying the menu!");
}
public void CaptureP(){
System.out.println("The product has been captured!");
}
public void ExitApplication() {
}
public static void main(String[] args) {
int Q;
System.out.print("Choose the operation to perform:\n1.SearchProduct\n2.UpdateProduct\n3.DeleteProduct\n4.DisplayMenu\n5.Capture the product\n6.Exit the application ");
Scanner input=new Scanner (System.in);
Q=input.nextInt();
Main S = new Main();
if(Q==1){
S.SearchP(); }
else if(Q==2){
S.UpdateP();}
else if(Q==3){
S.DeleteP();}
else if(Q==4){
S.DisplayMenu();}
else if(Q==5){
S.CaptureP();}
else if(Q==6){
S.ExitApplication();}
else{
System.out.print("Invalid option!");}
}
}
Comments
Leave a comment