1 / 15

CMSC 202 Introduction

Learn the fundamentals of object-oriented programming and design techniques using Java. Emphasis on program design and maintainability. Course includes exams, lab assignments, and projects.

jfields
Download Presentation

CMSC 202 Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CMSC 202 Introduction CMSC 202 Fall 2012

  2. Instructors & Lecture Sections • Mr. Max Morawski • Section 01 • Mr. John Park • Section 06 and 11 Version 9/12 2

  3. Course Format 2 Exams (15% each) 30% 1 Comprehensive Final Exam 20% 10 Lab Assignments (1% each) 10% 5 Projects (6, 7, 8, 9, 10%) 40% 3

  4. Project Policies • Cheating: • If you any of your code shows up in someone else’s projects, the minimum penalty is a zero for that project. You could also fail the course or possibly get expelled. • There is a VERY high chance of getting caught. Last semester we caught around 20 students. 4

  5. Project Policies • Projects must be submitted on time. Late projects will receive a zero. • You may submit exactly one project a semester up to three days late with no reduction of grade. • If you believe your grade is incorrect, you may contest it with your instructor within one week of getting your grade back. 5

  6. What is CMSC 202? • An introduction to • Object-oriented programming (OOP) and object-oriented design (OOD) • Basic software engineering techniques • Strong emphasis on proper program design and maintainability • Tools • Java programming language • Eclipse integrated development environment (IDE) • Linux (GL system) Version 9/12 3

  7. Course Web Site www.cs.umbc.edu/courses/undergraduate/202/fall12 Version 9/12 4

  8. Why Java for 202? • Popular modern OO language • Wide industry usage • Used in many types of applications • Desirable features • Object-oriented • Portability (cross-platform) • Easy handling of dynamic variables • Garbage collection • Built-in GUI libraries Duke, the Java Mascot Version 9/12 8

  9. Some Java Background James Gosling* • Created by Sun Microsystems team led by James Gosling (1991) • Originally designed for programming home appliances • Writing a compiler (translation program) for each type of appliance processor would have been very costly. • Solution: use a two-step translation process • compile, then • interpret *Wikipedia, 8/12 Version 9/12 9

  10. Interpreted Languages (e.g. JavaScript, Perl, Ruby) Java Compiled Languages (e.g. C, C++) translate & execute translate & execute compile compile execute Bytecode is platform independent Interpreter translates source into binary and executes it source code bytecode source code source code binary code Compiler is platform dependent Small, easy to write Interpreter is unique to each platform (operating system) Java Virtual Machine (JVM) Interpreters, Compilers, and the JVM interpreter compiler command JVM is an interpreter that is platform dependent Java compiler Version 9/12 10

  11. Windows C++ compiler Linux C++ compiler Any text editor Windows linker Linux linker Sample C++ Compilation & Linkage Linux C++ code library binary library code Linux C++ binary Linux C++ executable code C++ source code Windows C++ binary Windows C++ executable code binary library code Windows C++ code library Version 9/12 11

  12. Java Runtime Environment (JRE) for Linux Java Runtime Environment (JRE) for Windows Any Java compiler (Linux, Windows, etc.) Any text editor Sample Java Compilation, Interpretation, & Linkage Java source code Java bytecode • JRE contains • The Java API binary code • The Java Virtual Machine (JVM), which translates and runs the Java bytecode Version 9/12 12

  13. A Peek at Python vs. Java Python Java public class Hello { public static void main(String[] args) { int quotient; System.out.println("Hello, world"); quotient = 3 / 4; if (quotient == 0) { System.out.print("3/4 == 0"); System.out.println(" in Java"); } else { System.out.println("3/4 != 0"); } } } print "Hello, world" quotient = 3 / 4 if quotient == 0: print "3/4 == 0", print "in Python" else: print "3/4 != 0" • Some things to note regarding Java: • Everything has to be in some class • We need a “main()” procedure (method) • Statements end with “;” • Variables must be declared • “if/else” syntax different • Statement blocks demarcated by “{...}” • Much that is similar Version 9/12 15

  14. A Peek at the Eclipse IDE • Integrated Development Environment (IDE) for writing Java programs. Contains (minimally): • text editor • debugger • Java compiler • Java JVM • Free download for Windows/Linux/Mac • See course “Resources” page on the CMSC 202 web site • Available in all OIT labs around campus • We’ll show you more in Lab 1 Version 9/12 16

  15. Eclipse IDE Screenshot Version 9/12 17

More Related