samedi 1 octobre 2022

How can I create a user option in Java

How can I complete this code for program of user option?

import java.util.Scanner; import java.util.Calendar;

public class A1B1 { // declare a class, name A1B1

public static void showWelcome(){  // DO NOT MODIFY the method header
    // 1. METHOD BODY TO BE FINISHED BY STUDENT
}

public static String getCurTime(){ // GIVEN, DO NOT MODIFY
    Calendar c = Calendar.getInstance(); // current date & time as Calendar
    String curTimeStr = c.get(Calendar.HOUR_OF_DAY) + ":"
                    + c.get(Calendar.MINUTE) + ":"
                    + c.get(Calendar.SECOND);
    return curTimeStr;
}
public static int[] getRaNum(){  // DO NOT MODIFY the method header
    // 2. METHOD BODY TO BE FINISHED BY STUDENT
}

public static void showMenu(){  // DO NOT MODIFY the method header
    // 3. METHOD BODY TO BE FINISHED BY STUDENT
}

public static void main(String[] args){ // main() method, the entry point where the program starts
    
    
    System.out.println("\n>>> END of main(). Done by , x, x,x  <<<");               



Aucun commentaire:

Enregistrer un commentaire