Lab 1 - Page 1-4 Jave Programming Lab 1 Exercise 1 a. Open...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Page 1-4 Jave Programming Lab 1 Exercise 1 a. Open the following program in JCreator. The file Exercise1.java has been sent to you by email and is also posted on WebCT under Week1. Once it is open in JCreator, save it in the active workspace where you are allowed to write to disk. In the lab, the worskspace is Z by default. The file must be saved as Exercise1.java with no changes to the name. public class Exercise1 { public static void main(String args) { // 1. Perform your calculations here. int a= 3, b = 4, c = 5, d = 6; a += b; b -= c; c *= a; d %= 5; // 2. Output the results here. System.out.print("\nThe value of a is: " + a); System.out.print("\nThe value of b is: " + b); System.out.print("\nThe value of c is: " + c ); System.out.print("\nThe value of d is: " + d ); System.out.print("\n\n"); } } b. Compile your source code into bytecode. c. Execute the program and show your output for credit. Page 2-4 Exercise 2 a. Open the following program in JCreator. The file Exerc ise2.java has been sent to you by email and is also posted on WebCT under Week1. Once it is open in JCreator, save it in the active workspace where you are allowed to write to disk. In the lab, the worskspace is Z by default. The file must be saved as Exercise2.java with no changes to the name....
View Full Document

Page1 / 4

Lab 1 - Page 1-4 Jave Programming Lab 1 Exercise 1 a. Open...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online