Download presentation
Presentation is loading. Please wait.
1
1 CS4850 Programming Languages Wuwei Shen
2
2 Aministrivia Course home page: http://www.cs.wmich.edu/~wwshen/cs485.html Reference books: –Programming Languages, Principles and Paradigms, Second Edition by A. Tucker & R. Noonan Office hours: 3-4pm, T(EO)Th @B-256 or by appointment. Email: wuwei.shen@wmich.edu
3
Final Grade Final Grade is calculated based on the following: –Midterm 25%, –Final 25%, –Pas & HWs 50% Three late study days policy.
4
4 Why Take This Course? Consider the following program public class Rectangle { private double width, height; Rectangle(double w, double h) { width = w height = h; } public double area() { return width * height; } public void setWidth(double w) { width = w;} public void setHeight(double h){ height = h;} public double getWidth() { return width; } public double getHeight() { return height;} } ;
5
5 We will learn another way to define what is a “correct” program. This new way has some good advantages. How we, as a programmer of the language, know the error in a program. So, we will learn
6
6 Continue Let us consider the following client program public class Rectangle_Client { void static main () { Rectangle r = new Rectangle(2,3); System.out.println(r.area()); Rectangle r1 = new Rectangle(3,4); r = r1; System.out.println(r.area()); } What happens to the object Rectangle(2,3)?
7
7 So, we will learn The semantics of a program: what is the correct output after you call r.area(); Garbage collection: how garbage objects are automatically collected by the operating system/Java runtime system.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.