Course Info

#Programming Fundamentals 1

This is an introductory Programming module and assumes no prior knowledge of programming.

In this module, we will introduce you to the Java programming language through the Processing Development Environment (PDE) and then IntelliJ.

First, we will work through non-complex problems that will introduce you to the basic constructs of programming languages i.e. Sequence, Selection and Loops. You will also learn to use variables, different data types, manipulate the data, logical operators and methods. This will be done using processing.org

Then, using IntelliJ, we will progress to more complex problems that will briefly introduce you to object-oriented programming and data structures. You will do a deeper dive into both of these areas in the semester 2 module, Programming Fundamentals 2.

Exercises

  • These exercises are based on the functions we covered in the previous steps in this lab.

  • For each exercise listed below, create a new sketchbook.

Exercise 1

At the end of the previous step, your animation looked like this: Make the necessary changes so your animation now looks like this image:

Exercise 2

  • Draw a stick man as shown in the picture below: Basic Stick Man### Exercise 3

Replicate the basic Microsoft logo as shown in the picture below: Basic Microsoft Logo

Hint: You could use this website to find the exact Microsoft RGB colours in their logo.

Exercise 4

Convert the Microsoft logo into a grayscale logo as shown in the picture below: Greyscale version of the Microsoft logo Hint: the easiest way to do this is to use the grayscale fill function as opposed to the RBG version of it. The grayscale version of fill takes one parameter, a number between 0 and 255 inclusive. This numver represents a shade of gray between black (0) and white (255) e.g.:

    fill(150);   //sets a medium gray colour for all shapes drawn after it
    fill(0);     //sets a black colour for all shapes drawn after it
    fill(255);   //sets a white colour for all shapes drawn after it