1 CS4850 Programming Languages Wuwei Shen. 2 Aministrivia Course home page: Reference books: –Programming Languages,

Slides:



Advertisements
Similar presentations
The Point Class public class Point { public double x; public double y; public Point(double x0, double y0) { x = x0; y = y0; } public double distance(Point.
Advertisements

Inheritance // A simple class hierarchy. // A class for two-dimensional objects. class TwoDShape { double width; double height; void showDim() { System.out.println("Width.
INTERFACES IN JAVA 1.Java Does not support Multiple Inheritance directly. Multiple inheritance can be achieved in java by the use of interfaces. 2.We need.
5/17/2015 OO Design: Liskov Substitution Principle 1.
Welcome to MAT 142 TTh. Basic Course Information Instructor Office Office Hours Beth Jones PSA 725 Tuesday 10:30 am – 11:30 am Wednesday 11:45 am – 12:45.
More Inheritance and LSP CS340100, NTHU Yoshi. More about Inheritance Reuse? – Q1: 你有沒有程式 ” 砍掉重練 ” 的經驗 ? – Q2: 你有沒有 ” 再造輪子 ” 的經驗 ? class Rectangle – Firstly,
Welcome to MAT 170 MWF 9:40 SLN Basic Course Information Instructor Office Office Hours Beth Jones PSA 725 9:15 am – 10: 15 am Tuesday and Thursday.
Welcome to MAT 170. Basic Course Information Instructor Office Office Hours Beth Jones PSA 725 Tuesday and Thursday 10:30 am – 11:30 am Wednesday 9:40.
Typing Issues and LSP Amit Shabtay. March 3rd, 2004 Object Oriented Design Course 2 Typing Static typing Readability (Java vs. Pearl) Catching errors.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Syllabus (101)
CS101- Lecture 11 CS101 Fall 2004 Course Introduction Professor Douglas Moody –Monday – 12:00-1:40 – – –Web Site: websupport1.citytech.cuny.edu.
Welcome to MAT 210. Basic Course Information Instructor Office Office Hours Beth Jones PSA 725 Tuesday and Thursday 12 noon - 1 pm Wednesday 8:30 am –
Welcome to MAT 170. Basic Course Information Instructor Office Office Hours Beth Jones PSA 725 Tuesday and Thursday 8 am – 8:30 am Tuesday and Thursday.
1 CS4850 Programming Languages Wuwei Shen. 2 Aministrivia Course home page: Reference books: –Programming Languages,
Typing Issues and LSP David Rabinowitz. March 3rd, 2004 Object Oriented Design Course 2 Typing Static typing Reliability Catching errors early Readability.
Chapter 10: Inheritance and Polymorphism
Course Introduction Computer Science Department CS141:Computer Programming 1 Fall 2014 Dr. Hamid Al-Hamadi.
Welcome to MAT 170. Basic Course Information Instructor Office Office Hours Beth Jones PSA 725 Tuesday and Thursday 12 noon - 1 pm Wednesday 8:30 am –
Welcome to MAT 142. Basic Course Information Instructor Office Office Hours Beth Jones PSA 725 Tuesday and Thursday 10:30 am – 11:30 am Wednesday 9:40.
1 SWE Introduction to Software Engineering Fall Semester (081) King Fahd University of Petroleum & Minerals Information & Computer Science.
Chapter 11: Inheritance and Polymorphism Java Programming: Program Design Including Data Structures Program Design Including Data Structures.
UML Basics & Access Modifier
Welcome to CS 3260 Dennis A. Fairclough. Overview Course Canvas Web Site Course Materials Lab Assignments Homework Grading Exams Withdrawing from Class.
Computer Networks CEN 5501C Spring, 2008 Ye Xia (Pronounced as “Yeh Siah”)
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
1 COMS 261 Computer Science I Title: Course Introduction Date: August 25, 2004 Lecture Number: 01.
CS 106 Introduction to Computer Science I 03 / 19 / 2007 Instructor: Michael Eckmann.
Discrete Mathematics CS204 Spring CS204 Discrete Mathematics Instructor: Professor Chin-Wan Chung (Office: Rm 3406, Tel:3537) 1.Lecture 1)Time:
+ Introduction to Class IST210 Class Lecture. + Course Objectives Understand the importance of data, databases, and database management Design and implement.
CS 456 Advanced Algorithms Where: Engineering Bldg When: Monday & Wednesday 12:00 – 1:15 p.m. Texts: Algorithm Design, Jon Kleinberg & Eva Tardos.
Lecture.1: Getting Started With Java Jiang (Jen) ZHENG May 9 th, 2005.
CS511: Artificial Intelligence II
CSE332: Data Abstractions Section 1 Hye In Kim Winter 2013.
Finalizers, this reference and static Sangeetha Parthasarathy 06/13/2001.
Louisiana State University Information Technology Services CSC Introduction to Computer Science II for Majors CSC 1351: Introduction to Computer.
Inheritance CSI 1101 Nour El Kadri. OOP  We have seen that object-oriented programming (OOP) helps organizing and maintaining large software systems.
CS1201: Programming Language 2 Classes and objects Inheritance By: Nouf Aljaffan Edited by : Nouf Almunyif.
1. Perspectives on Design Principles – Semantic Invariants and Design Entropy Catalin Tudor 2.
1 CS308 Compiler Theory. 2 Course Information Instructor : –Prof. Minyi Guo –Yao Shen Course.
Copyright © 2012 Pearson Education, Inc. Chapter 13: Introduction to Classes.
CIS3023: Programming Fundamentals for CIS Majors II Summer 2010 Ganesh Viswanathan Abstract Classes Course Lecture Slides 7 June 2010 “None of the abstract.
CST 223 Concepts of Programming Languages Dr. Sherry Yang PV 171
CSE332: Data Abstractions Section 1 HyeIn Kim Spring 2013.
EMIS 8373 Course Policies Updated 9 January 2007.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley The Unified Modeling Language
CS 450/550 Operating Systems Loc & Time: MW 1:40pm-4:20pm, 101 ENG
CPE741: Distributed Systems Course Introduction
CS 240 – Computer Programming I Lab
Access Functions and Friend Functions
Inheritance ITI1121 Nour El Kadri.
Inheritance class TwoDShape { private double width;
22446: Microprocessors Introduction
CPE741: Distributed Systems Course Introduction
CPE741: Distributed Systems Course Introduction
Welcome to MAT 170 MWF 8:40 SLN
Comp Sci 200 Programming I Jim Williams, PhD.
Inheritance "Question: What is the object oriented way of getting rich? Answer: Inheritance.“ “Inheritance is new code that reuses old code. Polymorphism.
CAS CS112 Intro to CS II w/ C++
CS 200 Creating Classes Jim Williams, PhD.
Syllabus Instructor: Young Se Kim Office: Hickory 220H Ph.#
Welcome to MAT 142.
Welcome to MAT 170 MWF.
Networking CS 3470, Section 1 Sarah Diesburg
COMS 261 Computer Science I
Chapter 11 Inheritance and Polymorphism
CS 200 Creating Classes Jim Williams, PhD.
CS 200 Creating Classes Jim Williams, PhD.
EECE.3220 Data Structures Instructor: Dr. Michael Geiger Spring 2019
EECE.3220 Data Structures Instructor: Dr. Michael Geiger Spring 2019
Lecture 1 Class Overview
Presentation transcript:

1 CS4850 Programming Languages Wuwei Shen

2 Aministrivia Course home page: Reference books: –Programming Languages, Principles and Paradigms, Second Edition by A. Tucker & R. Noonan Office hours: 3-4pm, or by appointment.

Final Grade Final Grade is calculated based on the following: –Midterm 25%, –Final 25%, –Pas & HWs 50% Three late study days policy.

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