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.

Farenheit / Celsius Converter

In this step, you will work on reproducing the code example 6.10 from your lectures.

Writing the conversion method

Create a new Processing sketch in your workspace and call it Example_6_10.

Write a method called farenheitToCelsius that takes one float parameter.

The return type for this method is float.

The method returns the result of the conversion: (farenheit - 32.0) * (5.0/9.0)

Calling the conversion method

The farenheitToCelsius method should be called from the draw() method.

The value retuned from the calculation should be printed to the console.

Test your code by passing the farenheit value of 451. The celsius value printed should be: 232.77779