Title: START LAB 5
1START LAB 5
- Open or Print a copy of Lab 5 from
- personal.utulsa.edu/james-childress
- We will configure Xwin32 as follows
-
2Start -gt All Programs -gt XWin32 5.1 -gt X-Config
Select button labeled Wizard.
3Choose XDMCP
Click Next
4Select Query
Click Next
5Enter Host as login.ens.utulsa.edu
Click Next
6Enter Name of Session as Unix
Click Finish
7Start -gt All Programs -gt XWin32 5.1 -gt X-Win32
8X Icon
This places the X icon in the lower right of your
screen in the tool bar. Click on the X icon one
time only.
9Click on the X icon one time only
Select Unix
10(No Transcript)
11Linux Desktop
Double-click Home to view lab folders. Right
click to create a lab5 folder. Double click on
lab5 folder.
12Red Hat Programming - Nedit
13Open Terminal
To be able to enter the compile and run command
(javac and java), you need a session prompt.
Right click on desktop and select Open Terminal.
14Lab 5 Continued
- // your name
- // Lab 5
- // Section
- // Lab Instr Hepner / Johnson
- import java.io.
- public class lab5
-
- public static void main(String args) throws
IOException -
- //CODE
-
-
15Lab 5
Declare the variables int count 0 int sum
0 double average int min int max
//While Loop Syntax while(boolean expression) //
Header line // body of the code
F
Ask for the first input number
Assign min and max num
- Increase the count by 1
- Find out the minimum
- of min and num
- Find out the maximum
- of max and num
- Calculate sum
while (num ! -999)
Ask for the next number
T
F
if (count 0)
print a message saying no numbers were entered
T
F
print the results
16SCRIPT INSTRUCTIONS
- script script.lab5
- cat lab5.java
- javac lab5.java
- java lab5
- Run the test case
- exit // Dont forget to
exit ? - lp d l2 script.lab5