cop 3503 fall 2012 shayan javed lecture 19

47
1/ 47 COP 3503 FALL 2012 SHAYAN JAVED LECTURE 19 Programming Fundamentals using Java 1

Upload: marge

Post on 22-Feb-2016

27 views

Category:

Documents


3 download

DESCRIPTION

COP 3503 FALL 2012 Shayan Javed Lecture 19. Programming Fundamentals using Java. Course wrap-up. What you should know. Object-Oriented Programming. What you should know. Object-Oriented Programming Inheritance, Abstract Classes, Interfaces, Polymorphism, How to Design, etc. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: COP 3503 FALL 2012 Shayan Javed Lecture  19

1/ 47

1

COP 3503 FALL 2012SHAYAN JAVED

LECTURE 19

Programming Fundamentals using Java

Page 2: COP 3503 FALL 2012 Shayan Javed Lecture  19

2/ 47

Course wrap-up

Page 3: COP 3503 FALL 2012 Shayan Javed Lecture  19

3/ 47

What you should know

Object-Oriented Programming

Page 4: COP 3503 FALL 2012 Shayan Javed Lecture  19

4/ 47

What you should know

Object-Oriented Programming Inheritance, Abstract Classes, Interfaces,

Polymorphism, How to Design, etc.

Page 5: COP 3503 FALL 2012 Shayan Javed Lecture  19

5/ 47

What you should know

Object-Oriented Programming Inheritance, Abstract Classes, Interfaces,

Polymorphism, How to Design, etc. File I/O

Page 6: COP 3503 FALL 2012 Shayan Javed Lecture  19

6/ 47

What you should know

Object-Oriented Programming Inheritance, Abstract Classes, Interfaces,

Polymorphism, How to Design, etc. File I/O Searching and Sorting algorithms

Page 7: COP 3503 FALL 2012 Shayan Javed Lecture  19

7/ 47

What you should know

Object-Oriented Programming Inheritance, Abstract Classes, Interfaces,

Polymorphism, How to Design, etc. File I/O Searching and Sorting algorithms Basic Data Structures

Arrays, ArrayLists, Stacks, Queues, Linked Lists

Page 8: COP 3503 FALL 2012 Shayan Javed Lecture  19

8/ 47

What you should know

Object-Oriented Programming Inheritance, Abstract Classes, Interfaces,

Polymorphism, How to Design, etc. File I/O Searching and Sorting algorithms Basic Data Structures

Arrays, ArrayLists, Stacks, Queues, Linked Lists GUIs

Page 9: COP 3503 FALL 2012 Shayan Javed Lecture  19

9/ 47

Sample Interview Questions

Page 10: COP 3503 FALL 2012 Shayan Javed Lecture  19

10/ 47

Sample Interview Questions

What is Polymorphism and why is it useful?

Page 11: COP 3503 FALL 2012 Shayan Javed Lecture  19

11/ 47

Sample Interview Questions

What is Polymorphism and why is it useful?

Design a Parking Garage

Page 12: COP 3503 FALL 2012 Shayan Javed Lecture  19

12/ 47

Sample Interview Questions

What is Polymorphism and why is it useful?

Design a Parking Garage

Lots of coding questions involving data structures (Linked Lists, Arrays, Trees, Hashmaps, etc.)

Page 13: COP 3503 FALL 2012 Shayan Javed Lecture  19

13/ 47

What you won’t learn in your courses

Page 14: COP 3503 FALL 2012 Shayan Javed Lecture  19

14/ 47

1. Version Control

Page 15: COP 3503 FALL 2012 Shayan Javed Lecture  19

15/ 47

Version Control

Used to keep track of changes within your project.

Page 16: COP 3503 FALL 2012 Shayan Javed Lecture  19

16/ 47

Version Control

Used to keep track of changes within your project. Who made what changes, why, when

Page 17: COP 3503 FALL 2012 Shayan Javed Lecture  19

17/ 47

Version Control

Used to keep track of changes within your project. Who made what changes, why, when

Can look at history of changes

Page 18: COP 3503 FALL 2012 Shayan Javed Lecture  19

18/ 47

Version Control

Used to keep track of changes within your project. Who made what changes, why, when

Can look at history of changes Can revert to previous version at any time

Page 19: COP 3503 FALL 2012 Shayan Javed Lecture  19

19/ 47

Version Control

Used to keep track of changes within your project. Who made what changes, why, when

Can look at history of changes Can revert to previous version at any time

Git and Mercurial – two version control systems

Page 20: COP 3503 FALL 2012 Shayan Javed Lecture  19

20/ 47

Version Control

Used to keep track of changes within your project. Who made what changes, why, when

Can look at history of changes Can revert to previous version at any time

Git and Mercurial – two version control systems

GitHub (free website for your repositories) Google Code Repositories

Page 21: COP 3503 FALL 2012 Shayan Javed Lecture  19

21/ 47

Version Control

Create an account and store all your projects on there. (For all your future courses too)

Page 22: COP 3503 FALL 2012 Shayan Javed Lecture  19

22/ 47

Version Control

Create an account and store all your projects on there. (For all your future courses too)

Also serves as a portfolio

Page 23: COP 3503 FALL 2012 Shayan Javed Lecture  19

23/ 47

Version Control

Create an account and store all your projects on there. (For all your future courses too)

Also serves as a portfolio

Look up tutorials online on how to use Git/Mercurial

Page 24: COP 3503 FALL 2012 Shayan Javed Lecture  19

24/ 47

2. Other Programming Languages

Page 25: COP 3503 FALL 2012 Shayan Javed Lecture  19

25/ 47

Programming Languages

Already know Java.

Page 26: COP 3503 FALL 2012 Shayan Javed Lecture  19

26/ 47

Programming Languages

Already know Java.

Will learn C/C++ for next courses.

Page 27: COP 3503 FALL 2012 Shayan Javed Lecture  19

27/ 47

Programming Languages

Already know Java.

Will learn C/C++ for next courses. Try to learn it by yourself too (pointers!)

Page 28: COP 3503 FALL 2012 Shayan Javed Lecture  19

28/ 47

Programming Languages

Already know Java.

Will learn C/C++ for next courses. Try to learn it by yourself too (pointers!)

But should also try to learn other languages like: Python (used at Google/NASA/IBM), Ruby (Amazon), Perl

(Amazon), Lua (Game Scripting), C# (for Windows), Javascript (Web Programming), Objective-C (Macs, iOS)

Page 29: COP 3503 FALL 2012 Shayan Javed Lecture  19

29/ 47

Programming Languages

Can write programs in Python/Ruby very quickly.

Page 30: COP 3503 FALL 2012 Shayan Javed Lecture  19

30/ 47

Programming Languages

Task: Open a text file named 'list.txt' Create a list of the lines with more than 5 characters in the text file

Python program:

mylist = list()myfile = open('list.txt')

for line in myfile:    if len(line) > 5:        mylist.append(line)

Page 31: COP 3503 FALL 2012 Shayan Javed Lecture  19

31/ 47

Programming Languages

Task: Open a text file named 'list.txt' Create a list of the lines with more than 5 characters in the text file

Python program:

mylist = list()myfile = open('list.txt')

for line in myfile:    if len(line) > 5:        mylist.append(line)

Page 32: COP 3503 FALL 2012 Shayan Javed Lecture  19

32/ 47

Programming Languages

Task: Open a text file named 'list.txt' Create a list of the lines with more than 5 characters in the text file

Python program: (“long” version)

mylist = list()myfile = open('list.txt')

for line in myfile:    if len(line) > 5:        mylist.append(line)

Page 33: COP 3503 FALL 2012 Shayan Javed Lecture  19

33/ 47

Programming Languages

Task: Open a text file named 'list.txt' Create a list of the lines with more than 5 characters in the text file

Even shorter version:

mylist = [line for line in open('list.txt') if len(line) > 5]

Page 34: COP 3503 FALL 2012 Shayan Javed Lecture  19

34/ 47

3. Unix/Linux

Page 35: COP 3503 FALL 2012 Shayan Javed Lecture  19

35/ 47

Linux

Very useful to be proficient at the Linux (or Mac) command line.

Page 36: COP 3503 FALL 2012 Shayan Javed Lecture  19

36/ 47

Linux

Very useful to be proficient at the Linux (or Mac) command line.

High-learning curve, but very powerful.

Page 37: COP 3503 FALL 2012 Shayan Javed Lecture  19

37/ 47

Linux

Very useful to be proficient at the Linux (or Mac) command line.

High-learning curve, but very powerful.

Learn unix commands, bash scripting, Makefiles for compiling, etc.

Page 38: COP 3503 FALL 2012 Shayan Javed Lecture  19

38/ 47

Linux

Very useful to be proficient at the Linux (or Mac) command line.

High-learning curve, but very powerful.

Learn unix commands, bash scripting, Makefiles for compiling, etc.

Used for development everywhere (except for Microsoft)

Page 39: COP 3503 FALL 2012 Shayan Javed Lecture  19

39/ 47

Linux

Learn a text editor:

Page 40: COP 3503 FALL 2012 Shayan Javed Lecture  19

40/ 47

Linux

Learn a text editor:

VIM My personal choice. High learning curve, but once again very powerful.

Page 41: COP 3503 FALL 2012 Shayan Javed Lecture  19

41/ 47

Linux

Learn a text editor:

VIM My personal choice. High learning curve, but once again very powerful.

Emacs Also very good and powerful.

Page 42: COP 3503 FALL 2012 Shayan Javed Lecture  19

42/ 47

3. Mobile Development

Page 43: COP 3503 FALL 2012 Shayan Javed Lecture  19

43/ 47

Mobile Development

Android and iOS obviously very popular.

Page 44: COP 3503 FALL 2012 Shayan Javed Lecture  19

44/ 47

Mobile Development

Android and iOS obviously very popular.

You know Java now – try to make some apps.

Page 45: COP 3503 FALL 2012 Shayan Javed Lecture  19

45/ 47

Mobile Development

Android and iOS obviously very popular.

You know Java now – try to make some apps.

Good way to practice and show people what you made. Maybe also make some money

Page 46: COP 3503 FALL 2012 Shayan Javed Lecture  19

46/ 47

Conclusion

Need to put in a lot of effort yourself. You won’t learn everything in class

Page 47: COP 3503 FALL 2012 Shayan Javed Lecture  19

47/ 47

Conclusion

Need to put in a lot of effort yourself. You won’t learn everything in class

Hopefully you enjoyed the course and (importantly) learned a lot.