English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

One of my assignments is to: create a non-gui based Java application that calculates weekly pay for an employee.
We are using Eclipse software for this course. Is this the software I need to create a non-Gui application or is there something else? If this is the software, what is the difference when I create the program? ANy help would be greatly appreciated.

2007-04-19 09:07:38 · 3 answers · asked by Hairdresser4you 3 in Computers & Internet Programming & Design

Let me clarify, how do i know if i am creating a non-gui vs. a gui based application. what would determine the difference and how do i create a non-gui application.

2007-04-19 09:19:21 · update #1

3 answers

non gui is that the input and output is in the console.
eclipse is an excellent choice conghratulations !

for input use System.in.read
for out put System.out.println

for gui use awt / swing classes for in-output


public class NonGui {

/**
*
*/
public NonGui() {
super();
// TODO Auto-generated constructor stub
}

/**
* @param args
*/
public static void main(String[] args) {
try {
System.out.println("please enter a number and then press Enter button on your keyboard ");
int readInt = System.in.read();
System.out.println("input was not : " + (42 + readInt) );
} catch (Exception e) {
e.printStackTrace();
}

}

}

2007-04-19 09:59:20 · answer #1 · answered by gjmb1960 7 · 0 0

1) Let me clarify, how do i know if i am creating a non-gui vs. a gui based application. GUI applications are created with the JFrame classes. GUI is short for "Graphical User Interface." So, when you are entering information in a computer program like Quicken or Word. A non-gui is the command prompt like Dos prompt.

2)what would determine the difference and how do i create a non-gui application. To create a non-Gui, use the System.out.println("Hello World!") to show the user info, then use System.In to get user input.


for printing to the screen.

2007-04-19 16:26:53 · answer #2 · answered by ResourceGuy 4 · 0 0

K, by non gui do you mean text based program??? Like the output would be displayed on the screen. Then its pretty basic stuff. I need to know more specifics about the program before i can help you out, but im pretty sure that all you have to do is some basic calculations and print it out using
int hours = 10; // The number of hours they worked
int hourly pay = 8; // the hourly pay
int pay = hours * hourlyPay; // calculating pay
System.out.println("Employee pay"+pay);

If you need ANY more help, just contact me at my website.
http://www.devnet.tk
OR
http://devnetforum.forumer.com

2007-04-19 16:23:19 · answer #3 · answered by dogerman 2 · 0 0

fedest.com, questions and answers