*** Email a progress report each week to [email protected] , where CLASSNUMBER should be replaced by 2 or 3, depending on which class you are in. ***
Read Java Text Book: pp. 1-22
NOTE: Java Text Book page 1 is page 35 of the PDF. In the assignments and labs, the page numbers are the actual book page numbers (not the PDF page numbers). To calculate the PDF page number, just add 34 to the actual book page number!
Read Java Text Book pp. 644-652
Read Java Tutorial : New to Java > Learning the Java Language > Language Basics > Arrays
Read Java Tutorial : New to Java > Learning the Java Language > Language Basics > Variables
Read Java Tutorial : New to Java > Learning the Java Language > Language Basics > Primitive Data Types
Read Java Text Book: pp. 25-40
Read Java Text Book: pp. 1-22
I. Create a subclass of Animal, similar to Dog or Cat, using your own animation frame image set (sprite sheet) and sound effects. You can find sprite sheets and sound effects on opengameart.org
You need a file called plasmaball.wav (You can also record your own audio and create your own images.)
II. Make the necessary changes in AnimalTestG so that your animal is instantiated and updated similarly to the cat and dog.
III. Consider how you can use the tools demonstrated by AnimalTestsG to implement your own game/simulation.
I. Create a subclass of Animal, similar to Dog or Cat, using your own animation frame image set (sprite sheet) and sound effects. You can find sprite sheets and sound effects on opengameart.org
You need a file called plasmaball.wav (You can also record your own audio and create your own images.)
II. Make the necessary changes in AnimalTestG so that your animal is instantiated and updated similarly to the cat and dog.
III. Consider how you can use the tools demonstrated by AnimalTestsG to implement your own game/simulation.
I. Create a subclass of Animal, similar to Dog or Cat, using your own animation frame image set (sprite sheet) and sound effects. You can find sprite sheets and sound effects on opengameart.org
II. Make the necessary changes in AnimalTestG so that your animal is instantiated and updated similarly to the cat and dog.
III. Consider how you can use the tools demonstrated by AnimalTestsG to implement your own game/simulation.
I. Create a subclass of Animal, similar to Dog or Cat, using your own image. You can find images on opengameart.org
II. Make the necessary changes in AnimalTestG so that your animal is instantiated and updated similarly to the cat and dog.
III. Consider how you can use the tools demonstrated by AnimalTestsG to implement your own game/simulation.
Implement a simple AWT/Swing application that presents a window (JFrame) with an input text box (JTextField), an output text box, and a "Factorial" button (JButton). The user should be able to type a small integer into the input text box, and then click the button to see the factorial of the input integer displayed in the output text box. You can begin with the code on pages 665-666 in section 16.12.
Implement a simple AWT/Swing application that displays a message in a JLabel component. The JLabel should be added to a JFrame. You can begin with the code on pg. 648 of Java Text Book. Try making some changes, and begin considering how to implement your project using AWT/Swing.
Coefficients.java (PART I - Try to calculate B_20. Notice how long it takes. Then, modify the a(l, k) method to use the a[k][l] array instead of calling itself recursively. Notice the speedup. Part II - After making this change, see what the largest Bernoulli number you can calculate is.)
Coefficients2.java (PART III - This implementation saves a lot of memory by using only one array. It is also a bit faster than the completed implementation from part I. See what the largest Bernoulli number you can calculate with this implementation is.)
AnimalTestG.java (Part I - Determine where to place dog.png so that it is found by ImageIO.read() at run time (See the draw() method in Dog.java). PART II - Find the comment that says MOVE THE ANIMAL in AnimalTestG.java and add a line of code under it to move the animal. Look at the Animal class to see how to call the move(int) method. Part III - Replace dog.png with your own image. )
PolygonTestG.java (Create a second polygon instance with a different set of points. Display the second polygon next to the first one.)
Animals.zip (Extract this into your src folder. Run AnimalTest. Then implement a new type of Animal. PART II: Create an array of type Animal and store several types of animal objects in it; then iterate over the array, calling the speak() method on each Animal. PART III: Think of some other behavior or state that your animal could have. You can modify the Animal superclass itself if necessary.)
Coefficients.java (Modify Coefficients.java to print only the Bernoulli numbers. Then time the calculation of B_1000 using System.currentTimeMillis().)
Parentheses.java (Fill in the blanks to complete the parentheses syntax checker.)
Calc4.java (Set driveLetter , javaBin , and expressionFolder for your lab computer, as described in the comments at the top of Calc4.java. Run Calc4 on your lab computer.)
Fraction.java (Fill in the blanks: BLANK_0 through BLANK_7)
FractionSum.java (Fill in the blanks: BLANK_0 and BLANK_1)
public class FractionTest { public static void main(String[] args) { // f1 = 3/4 int n1 = 3; int d1 = 4; // f2 = 1/2 int n2 = 1; int d2 = 2; // f3 = f1 + f2 = n1/d1 + n2/d2 = n3/d3 // Here you should calculate n3 and d3 correctly : int n3 = 123; int d3 = 456; System.out.print(n1 + "/" + d1); System.out.print(" + "); System.out.print(n2 + "/" + d2); System.out.print(" = "); System.out.print(n3 + "/" + d3); } }
1. Use the IntelliJ IDE installed on your lab computer to create, build, and run the example Java program.
2. Decide on a method of storing your lab assigments, so that you can work on them during multiple class sessions. Then save the example program you just ran. e.g. Email your project to yourself, or copy it to your USB drive.
3. Shutdown your lab computer. After it is shutdown, wait for a few seconds.
4. Turn on your lab computer.
5. Retrieve your program from the email you sent or from your USB drive or other storage location, and then run it using the IntelliJ IDE installed on your lab computer.