Java: Rainfall Model
This page discusses - Java: Rainfall Model.
Java: Rainfall user interface - Dialog
This page discusses - Java: Rainfall user interface - Dialog.
Java: Rainfall user interface - Console
This page discusses - Java: Rainfall user interface - Console.
Java: Kilometer to Miles - IO Class
Java: Kilometer to Miles - IO Class.
First Program - Do Nothing
Here is just about the smallest legal program you can write..
Programming: Weeks and Days
It should then display the number of weeks and days ..
Programming: To Uppercase
Converts it to uppercase, and displays the string in another dialog box..
Programming: Prime Numbers - Dialog
Write a program that reads an integer from the user, and displays a message about whether or not it's a prime number..
Programming: Convert Miles to Kilometers
Write a program which inputs miles (a double) and displays the equivalent number of kilometers..
Programming: Flip Names
Write a program that reads a name in first last format and convert it to last first format ..
Programming: Count X
Write a program which counts the number of times the letter "x" or "X" appears in the input..
Programming: Count Words - Dialog
Write a program which counts the number of words in text the user enters..
Programming: Count Words - Dialog
Write a program which counts the number of words in text the user enters..
Example: Count Bad Words
One of the first things she wants to do is search thru the grandchildren's email to make sure they aren't using any "bad" words..
Programming: Numeric Conversion
Read a number (or numbers) in one system and output the equivalent number (or numbers) in the other system..
Programming: Numeric Conversion
Write a program which converts a measurement from one system of units to another..
Programming: Body Mass Index - Dialog
Write a program that computes the user's Body Mass Index (BMI). BMI is a commonly used formula which shows the relationship of your weight for your height..
Dialog and Console Input-Output
This is similar to the previous program, but it also gets input from the user..
Dialog Box Output
This is very similar to the first program, but it actually does something. The additional parts are described below..
Leap Year Program
This program reads a year and tells the user if it's a leap year or not..
Dialog I/O: Kilometers to Miles with Method
This program is the same as Kilometers to Miles,.
Dialog I/O: Kilometers to Miles
This basic program asks the user for a number of miles and converts it to kilometers..
Kilometer to Miles - Formatted
This program is the same as Kilometers to Miles..
Dialog Box: Input Range Method
This utility method shows how to read in a loop until a number in a satisfactory range is entered..
Dialog Box Input Loop
Indicating end of input with cancel or close box, a special value, or empty input.
Example: Capitalize
This program reads a word, makes the first letter upper case and the remainder lower case, and outputs it..
Console Output
You can write programs that write text lines to the "console", which is typically a DOS command window..
Console Input: Scanner
The java.util.Scanner class (added in Java 5) allows simple console and file input..
Console Input-Output (Java 5)
Java 5's java.util.Scanner class has simplified console I0..
Console vs Dialog I/O
Console I/O was the only kind of I/O that was built into programming langauges from the beginning of programming until recently..
Alternatives to SavitchIn
SavitchIn to read from the console input stream..