import java.util.Scanner;
//class Product
public class Main {
public void SearchProduct() {
System.out.println("The product found!");
}
public void SaveProduct() {
System.out.println("The product successfully saved!");
}
public void UpdateProduct() {
System.out.println("The value of the product successfully updated!");
}
public void DeleteProduct() {
System.out.println("The product deleted!");
}
public void DisplayMenu() {
System.out.println("This is the menu!");
}
public void CaptureProduct(){
System.out.println("The product has been captured!");
}
public void ExitApplication() {
}
public void speed(int maxSpeed) {
System.out.println("Max speed is: " + maxSpeed);
}
public static void main(String[] args) {
int option;
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);
option=input.nextInt();
Main myProduct = new Main();
if(option==1){
myProduct.SearchProduct(); }
else if(option==2){
myProduct.UpdateProduct();}
else if(option==3){
myProduct.DeleteProduct();}
else if(option==4){
myProduct.DisplayMenu();}
else if(option==5){
myProduct.CaptureProduct();}
else if(option==6){
myProduct.ExitApplication();}
else{
System.out.print("Invalid option!");}
}
}
Comments
Leave a comment