import java.io.*;
public class Wisk_project_template
{
private static BufferedReader inStream = new BufferedReader (new InputStreamReader (System.in));
//*****************************************************************************
// handles addition
private static void optel () throws Exception
{
// ask name
System.out.print ("Hi - what is your name? ");
// call menuLevels and ask for level
menuLevels ();
System.out.print (
char choice =
// set levels
// default level is easy
int level = 3;
if (choice == '2')
{
}
if (choice == '3')
{
}
// Ask how many sums
System.out.print ("How many sums? ");
// declare variables to be used - nr of sums correct, the correct answer and the user's answer
// for loop - ask sum, check answer, update stats and provide message
// determine percentage and print message to user
}
//*****************************************************************************
// menu for levels
private static void menuLevels ()
{
System.out.println ("\t\t MENU TO INDICATE LEVEL");
System.out.println ("1. Easy");
System.out.println ("2. ");
System.out.println ("3. ");
}
//*****************************************************************************
// main menu for program
private static void menuMain ()
{
// write menu to screen
System.out.println ("\t\t MENU");
System.out.println ("A. Optel");
System.out.println ("B. Aftrek");
System.out.println ("C. ");
System.out.println ("X. Exit");
}
//*****************************************************************************
// main method
public static void main (String[] args) throws Exception
{
char choice;
// do while x or X is not entered
do
{
menuMain ();
// read user's choice
System.out.print ("\nPlease enter your choice...: ");
choice =
switch (choice)
{
case 'A':
case 'a':
{
optel ();
break;
}
case 'B':
{
break;
}
default:
{
System.out.println ("");
break;
}
}
}
while (Character.toUpperCase (choice) != 'X');
System.out.println ("Bye-Bye");
} // main method
}
JavaStudent101z 0 Newbie Poster
NormR1 563 Posting Sage Team Colleague
JavaStudent101z 0 Newbie Poster
NormR1 563 Posting Sage Team Colleague
JavaStudent101z 0 Newbie Poster
NormR1 563 Posting Sage Team Colleague
JavaStudent101z 0 Newbie Poster
JavaStudent101z 0 Newbie Poster
NormR1 563 Posting Sage Team Colleague
navyavadde 0 Newbie Poster
NormR1 563 Posting Sage Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.