INF1B: Week 1: Intro and Basics; Conditionals and Loops
Week highlights
By the time you have completed this week, you should understand:
From Lecture 1:
- what object oriented programming is and why focussing on objects can be helpful
- what the role of classes is in OOP and how to create one
- how to compile and run a program
- some common data types
- how to do some basic arithmetic
From Lecture 2:
- Why conditionals and loops are important in coding
- How a conditional loop is structured
- What a while loop is for
- The difference between a while loop and a for loop, and how you decide which to choose
- Exiting loops early
- How to nest conditionals
Introductory lecture
This contains all the info about the course - where, when and how things will happen - that we covered in the first lecture.
- Slides: Lecture 0 - Introduction
Lecture 1: Introduction and Basics
- Slides: Lecture 1 - Getting Started
Lecture 1 ➡ Java Tutorial:
- Read Chapter 1. Getting Started, but skip NetBeans subsection in section The "Hello World!" Application (we use IntelliJ, not NetBeans as our IDE). Try the exercises at the end.
- Skim Chapter 2. Object-Oriented Programming Concepts (we will come back to this later).
- Read part of Chapter 3. Language Basics, up to section Expressions, Statements and Blocks, but skip the subsection on Arrays.
Lecture 2: Conditionals and Loops
- Slides: Lecture 2 - Control
Lecture 2 ➡ Java Tutorial:
- Read the rest of Chapter 3. Language Basics from Expressions, Statements and Blocks to the end of the chapter.
Lecture 2 ➡ Objects First:
- Read appendices C.2 Boolean expressions, C.3 Short-circuit operators, D.1 Control structures, D.2 Selection statements, and D.3 Loops
Tutorial
There are no tutorials this week. Instead, if you haven't already, you should walk through the self-paced getting started materials (see the getting started page in this course).
Lab exercises
This week's lab exercises cover introduction to tools, main function, print output and command line arguments. There are four core lab exercises. You can find them in the 'INF1B: Labs Site' page from the navigation links.
You can also use lab sessions to get support for installing the tools you will need for the course, if you are having trouble getting through the material in the Getting Started page.
What should I be doing with assessment?
Nothing so far - don't worry about it this week. This week, you just have to do your module test and survey.