Wednesday, September 26, 2007

Provide yourself an example (not one from your instructor) of how you use a particular command that will help jog your memory in the future when you need that command again. You must provide a little code as well as a written explanation with this one.

Today, I learned about a static class called Math. As primitives do not have a class (unlike strings), the Math method is used to do special calculations. It contains sqrt (square root), abs (absolute value), and many other similar methods. Here is an example:

double a=16;
System.out.println(Math.sqrt(a));
//this would print 4.0

This is, thus, a very useful method.

Tuesday, September 25, 2007

What progress did you make today on your solution? What needs to be completed next class?

Today, I learned about the string method and how it is different from primitives. This method is used to declare and assign values to codes in written form. Here is an example:

String s="hello";

This would assign hello to s. I plan to master this method in the next class.

Sunday, September 23, 2007

Scored on 9/23/07. Check edline for grade posting tomorrow evening.

Friday, September 21, 2007

What problems did you encounter while developing your solution? How do you plan to overcome them?/How did you overcome them?

Today, I tried to create a car using java. In order to create pictures using java, it is necessary to import some methods from the library. I imported these methods during the first days of school, and, unfortunately, I did not remember how to import a library. So I tried to right click on the project and figure out what to do. My teacher, Ms. Petr, helped me on this, and now I know how to import something. Once I imported apcslib to my program, things worked out easily.

Thursday, September 20, 2007

How did you go about testing your program? What were the results of that testing?

As it was my goal to, today I worked on mastering the number operations on java. I worked on practice problems so that I would get used to the methods. I wrote a program to see what the results turnout to be and I realized the importance and purpose of Casting. Look at the following coads :

double d=61/20; // this would make d 3.0. However,
double d=(double)61/20; // would be 20.3333333333

This shows how crucial Casting is. I also learned other methods and writing and testing my program helped me learn even more.

Tuesday, September 18, 2007

What progress did you make today on your solution? What needs to be completed next class?

Today in class, I learned about data types and how to operate mathematical functions while using java. I learned about such methods as int, double, Boolean, etc. These are very interesting characters and they are very useful at the same time. There is a trick to using them all the right way. Today, I learned them all, and I am going to spend some time studying them and committing them to memory. Next class, I will work on mastering these methods.

Monday, September 17, 2007

What choices did you face in developing your solution, and how did you choose among them?

Today, I used the System.out.print method to draw an animal on the console screen. It was very interesting. There are many tricks to this method. One of them is using System.out.println to proceed to the next line and write something different. I used that method and was able to draw the face of a cat like animal on the console window. The println method helped out a lot. It was like a shortcut to going to the next line. When I was done writing the code, I run it, and it turned out looking very nice.

Friday, September 14, 2007

What choices did you face in developing your solution, and how did you choose among them?

Today, I learned about the importance of every line in a public static void main (String[] args) method. Furthermore, I learned about a method that looks like this:
system.out.print();
This is used to print numbers and letters on the console screen. I learned that I could use methods like "\n", \\n, and ln to make the programs less tedious. These are very important tools when, for example, I want to go to a new line.

Wednesday, September 12, 2007

Provide yourself an example (not one from your instructor) of how you use a particular command that
will help jog your memory in the future when you need that command again. You must provide a little
code as well as a written explanation with this one.

Today I learned how to incorporate colors with my drawings. I used a document to see what I need to do to draw colored lines. The code:

import java.awt.Color;
.
.
setColor (Color.red);


The first part imports the file that the compiler needs to have in order to set in colors. The second part is just used to show the compiler where the color is needed and what color it is.
Example:

marker.up();
marker.move(5,-100);
marker.down();;
marker.setColor(Color.blue);
marker.move(5,-75);
marker.move(20,-50);


This code was used to make a door. The marker.setColor(Color.blue); makes the lines used to make the door blue.

This is a very important tool to use in programming.

Tuesday, September 11, 2007

What progress did you make today on your solution? What needs to be completed next class?

Today, I worked a lot an drawing methods. It is really interesting to use java to draw pictures. I mastered methods such as move, forward, turnRight, turnLeft, up, down, etc. I learned how the worked and applied them in many of my drawing programs. The worked very well and I had a lot of fun working with them. My drawings came out to be very nice and just as I expected them. Next class, I would like to master these methods and make my way to even complicated methods.

Monday, September 10, 2007

What problems did you encounter while developing your solution? How do you plan to overcome them? How did you overcome them?

Today, while trying to program a smiley face, I made some errors. I looked at the errors and I tried to see what was wrong. After analyzing my problems, I asked my teacher what to do, and using the hints she gave me, I corrected my mistakes. I run the program and it ended up being very interesting. Achieving my goal made me very happy.

Friday, September 7, 2007

How did you go about testing your program? What were the results of that testing?

Today, I made my firs diagrams on Java. It was really a lot of fun. I first wrote the code and tried to run the program. Before running the program, I checked to see if there were any mistakes in the code, and there were. With the help of my teacher, Ms. Petr, I identified my mistakes and learned how to correct them. When I finished the code and run it, it felt like a great accomplishment. I am going to challenge myself by making other programs that are more intricate.

Thursday, September 6, 2007

What progress did you make today on your solution? What needs to be completed next class?

Today I was given an introduction to Java. I used a code that was fairly simple to run a program that says Hello PBHS!
The code:

public class Hello {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.print("Hello,PBHS!");
}
}

This introduction was really interesting and I am really excited about doing more programs. I am sure that this will be a lot of fun, but also challenging.