Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main menu #12

Open
andreanhenkisaputro opened this issue Oct 3, 2020 · 0 comments
Open

Main menu #12

andreanhenkisaputro opened this issue Oct 3, 2020 · 0 comments

Comments

@andreanhenkisaputro
Copy link

package com.dicoding.javafundamental.bangundatar;

import java.util.Scanner;

public class Main {

private static char pilihan;
private static Scanner scanner = new Scanner(System.in);

public static void main(String[] args) {
    /*Kamus*/
    PersegiPanjang opersegi;
    SegitigaSiku osegitiga;
    Lingkaran olingkaran;
    int s1, s2, r;

    opersegi = new PersegiPanjang();
    osegitiga = new SegitigaSiku();
    olingkaran = new Lingkaran();
}

private static void mainMenu(){
    //pilihan menu
    System.out.println("====================");
    System.out.println("Hitung Luas dan Keliling :");
    System.out.println("1. Persegi Panjang");
    System.out.println("2. Segitiga Siku");
    System.out.println("3. Lingkaran");
    System.out.print("Masukan Menu : ");
    pilihan = scanner.next().charAt(0);
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant