In Java the switch statement is alternative way to express nested if statements. We will learn how it works.
We will also have a closer look at constructors, methods to create instances of classes. We have already used the default constructors without knowing them. Today's lesson will help us to understand them better.
Watch the presentation for details.
Homework
Answer the review questions for today's lesson.
We will have a test on Java next Tuesday, May 12, 09.
Tuesday, May 5, 2009
Monday, May 4, 2009
Conditional Execution and Comments
In real life we often need to make decisions based on a yes/no question. Depending on the outcome we go either this way or another. In Java the control structure of the if-else statement and of the if-else-if statement help us to handle those situations in computer applications. Based on a condition the program continues either with one part or with another another.
For details watch the presentation:
In the lab we will work on and improve the Car class.
Homework
Answer the review questions about conditional execution and comments.
For details watch the presentation:
In the lab we will work on and improve the Car class.
Homework
Answer the review questions about conditional execution and comments.
Tuesday, April 28, 2009
Inheritance and Method Overriding
After a recap about classes and data types in Java we will expand our knowledge about object-oriented programming today.
Two important ideas we will be learning about are inheritance and method overriding.
Inheritance means that a new class, called a subclass, inherits all the attributes and all the methods of an existing class, called the superclass, and extends it with its own attributes and methods.
Java also allows to adapt and re-write the methods from the superclass in the subclass. We call this "method overriding". By this each object of the superclass can be of a specific subclass. In object-oriented programming this is known as polymorphism. Watch today's presentation.
Homework
Answer the review questions about classes in Java.
Two important ideas we will be learning about are inheritance and method overriding.
Inheritance means that a new class, called a subclass, inherits all the attributes and all the methods of an existing class, called the superclass, and extends it with its own attributes and methods.
Java also allows to adapt and re-write the methods from the superclass in the subclass. We call this "method overriding". By this each object of the superclass can be of a specific subclass. In object-oriented programming this is known as polymorphism. Watch today's presentation.
Homework
Answer the review questions about classes in Java.
Tuesday, April 21, 2009
Classes and Data Types in Java
After a closer look at the HelloWorld program (see presentation: How Java Programs work?) we are transferring our knowledge about classes from Alice to Java today.
By doing that you will also learn about variables and primitive data types in Java. You have seen data types for parameters of methods in Alice, but we have never talked about variables.
Variables can be used to store and manipulate values for the properties of a class. Those properties are called attributes in Java.
The presentation Java Classes and Data Types will help you to understand the details.
By doing that you will also learn about variables and primitive data types in Java. You have seen data types for parameters of methods in Alice, but we have never talked about variables.
Variables can be used to store and manipulate values for the properties of a class. Those properties are called attributes in Java.
The presentation Java Classes and Data Types will help you to understand the details.
Monday, April 20, 2009
Java Programs in Eclipse
Today we are taking it one step further: Instead of working with Notepad and the primitive command line interpreter for writing, compiling and running Java programs, we are using Eclipse from now on.
Eclipse is an integrated development environment that makes it easier for you to write Java programs. It is a well known program used by professional software engineers. We are exploring Eclipse by writing and extending the HelloWorld program. Watch the Eclipse presentation for details.
Homework
Answer the review questions on Eclipse.
Eclipse is an integrated development environment that makes it easier for you to write Java programs. It is a well known program used by professional software engineers. We are exploring Eclipse by writing and extending the HelloWorld program. Watch the Eclipse presentation for details.
Homework
Answer the review questions on Eclipse.
Tuesday, April 14, 2009
Introduction to Java
To prepare for the first term test we will be reviewing all the bits and pieces we have learned about so far in Term 3 using the review sheet.
After that we are going learn and practice how to write, compile and run our first Java program. It will make the computer say: "Hello World".
The "Introduction to Java" and the vocabulary puzzle will help you.

Homework
Prepare for the upcoming test on Monday, April 20, 2009: Know about
After that we are going learn and practice how to write, compile and run our first Java program. It will make the computer say: "Hello World".
The "Introduction to Java" and the vocabulary puzzle will help you.

Homework
Prepare for the upcoming test on Monday, April 20, 2009: Know about
- Recursion,
- the basics about Java,
- careers at EA, and
- the history of programming languages.
Tuesday, April 7, 2009
Review Programming Languages
In our class today (only until noon) we are finishing our unit about the history of programming languages. Make sure you are able to solve the matching puzzle. Then you will be well prepared for the upcoming test on Monday, April 20.
Homework
Answer at least 10 of the 20 review questions.
Happy Easter !!!!
Homework
Answer at least 10 of the 20 review questions.
Happy Easter !!!!

Subscribe to:
Posts (Atom)