Java Processing

Week 8

Today is the first day of Java week where we are going to have a crash course on the different types of Java. The first question we were asked was; What is Java? Well, with the aid of the internet, I learned that java is a platform that computers use to run browser games, watch videos, and all those other things that need to be processed. Java was made by Sun Microsystems back in 1995. The difference between Java and JavaScript is that Java can run on applications and browsers but JavaScript only runs on browsers.

First project

Today was mostly a play around on Java day, but in the beginning we got a small crash course on Java. Because Java is mostly about graphics and visuals, we had to learn how to make shapes and how to change the color, but because Java is also able to have be like an animation or I guess you could say that it can change in a way that it looks like it is moving. For instance, we made a bouncing ball, which when you look at it, it does look like its bouncing, but actually its just making another ball over and over again but in different places.



Playing more on Java Day 2

Today we continued to work with Java, but unlike yesterday, today we tried to use functions instead of just making a line of code. And this is where I learned how different Java is from Python. Brackets! SO MANY BRACKETS AND SEMICOLONS! Unlike Python, Java recquires functions to be in stupid brackets instead of just a regular colon, so if you have a lot of "if" statements, you are bound to get lost without proper committing. And every line in Java needs a semicolon which I guess you have to get used too but for now its a big pain. Back to what we did today, today we first made a lady bug out of a function. I wasn't able to finish my whole body, but all I needed was some legs and some antennae.



Later that day we started to work on the bouncing balls that we started on yesterday. Today we tried to make many balls bouncing around.From this I learned that when you make a list, you need to say how many things that you're going to list which I just gotta get used to. But the rest was pretty easy because all we needed to do was make a random function to change the color, size, velocity, etc and then we had many different balls. Some of the problems that we ran into was that we first made many balls, but only one of them showed. As it turned out, all the balls were there, but in one same ball. This was fixed when we changed the balls velocities and sizes.colors.



Java Scripting

Today we started to use JavaScript instead of Java which is very similar except for a couple tell tale differences such as:

1. You need to use semicolons even more so than in Java.

2. You do not need to say how many items that you are going to list.

3. You need to add all the RGB numbers to get a color.

4. And you need to add "function =" in every function



One Ball

Thursday week 8

Today was another day using Java Script which is different from Java, but because we've been using it this whole week, I've gotten pretty comfortable using Java or JavaScript, but I still got a lot to learn. So with my current knowledge I was able to make a pretty basic shape of a heart which I wished I could've added more too, but I spent a while trying to make the bouncing ball code. But it's pretty cool how many different programs have been made to simplify and teach Java and JavaScript like for the first and second day we used a program called Processing, on the third day we used Khan Academy, and today we used a website called p5.js to make JavaScript files. But all of these are similar in some way, and their only differences are seen throught their syntax. For instance; Java uses words like int and void while JavaScript will use var and function, both of these are variables and functions, but their syntax is different so you cant use a Java syntax in a JavaScript code. All in all, my final product for today is this:

JavaScript Free Code