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 - String

To complete the challenge exercises below, you may need to refer to the methods that are available for String variables:

Exercise 10

Write a method, called exercise10 that will read in 5 names into a String array. Each name should then be printed out to the console.

Challenge Exercise 11

Write a method, called exercise11 that will read in 5 names into a String array (as above). This time, each name should be CAPITALISED (uppercase) when printing to the console.

Challenge Exercise 12

Write a method, called exercise12 that will read in 5 names into a String array (as above). This time, each name should be converted to all lowercase when printing to the console.

Challenge Exercise 13

Write a method, called exercise13 that will read in 5 names into a String array (as above). This time, only print out the names that have at least 7 characters in them.

Challenge Exercise 14

Write a method, called exercise14 that will read in 5 names into a String array (as above). This time, only print out the first 3 characters of each name to the console.

Challenge Exercise 15

Write a method, called exercise15 that will read in 5 names into a String array (as above). This time, only print out the first 3 characters in UPPERCASE of each name to the console.

Challenge Exercise 16

Write a method, called exercise16 that will read in 5 names into a String array (as above). This time, only print out the names that contain ann.

Note how the search above is case sensitive…i.e. it will only find lowercase ann and won’t find the second entry Annemarie. See can you work out a solution for this.