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
Recommended Answers
Jump to PostPlease edit your code and wrap it in code tags. Use the [code] icon above the input box.
What is your problem with the code? What does it do? What do you want it to do?
If you get errors, please copy and paste here the full text …
Jump to PostPlease edit your code and wrap it in code tags. Use the [code] icon above the input box.
1)What is your problem with the code?
2)What does it do? Show its output
3)What do you want it to do?If you get errors, please copy and paste here the full …
Jump to PostCan you answer any of my questions?
For example can you execute the program, copy its output and paste it here?
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper …
All 10 Replies
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.