CS 111A Lecture Notes - Calculations - Chapter 2 part 2

Primitive Datatypes

Calculations, Assignments

Shortcut Operators

Formatting Output using printf

Mathematical Functions (Methods)

Type Casting

Constants

In-class exercise: You're planning a wedding, and you need to transport all your wedding guests from the ceremony to the reception. A bus can carry 40 passengers. Your program should ask the user how many guests are expected, and it should output how many busses are needed, and the number of extra people you could carry with those busses.

Busses.java: Solution to above in-class exercise

Reference Variables, Memory Allocation, and Variable Scope

String methods

Return to CS 111A page