oocp lecture 1_2

Upload: faizi9211

Post on 07-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/4/2019 OOCP Lecture 1_2

    1/20

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    2/20

    ObjectOrientedConceptsand

    Programming

    By

    Dr. Tabbasum Naz

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    3/20

    C r lin

    Course Title Object Oriented Concepts andProgramming

    CSC244/CSC245

    Credit Hours 4(3,1)

    Semester Fall 2011esource erson .

    Contact Hours (Theory) 3 hours per week

    Contact Hours (Lab) 3 hours per week

    Office Hours Shall be communicated later

    Email [email protected]

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    4/20

    GENERALOVERVIEW ThiscourseprovidesanintroductiontotheconceptsandmethodologyofObject

    OrientedPro rammin withJavaasanillustrationlan ua e.

    Coursealsohelpstudentstoimplementobjectorientedconceptsinthelabkeepinginmindtherealworldproblems.

    Understandmajorconceptsofobjectorientedprogramming

    KnowledgeandskillsinOOdesignandprogramdevelopment

    ExperienceinJavaprogrammingandprogramdevelopmentwithinanintegrateddevelopmentenvironment

    Certainskillsinusinggraphicaluserinterface

    TopicscoveredinthiscourseprovideafoundationformoreadvancedcoursesinComputerScience

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    5/20

    TEXTBOOKJavaHowtoProgram,byDeitel &Deitel,7th Edition

    RECOMMENDEDBOOKS Java2:TheCompleteReference,byPatrickNaughton

    andHerbertSchildt

    th

    ,

    ,

    Edition, 2006

    Be innin Java2b Ivor Horton

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    6/20

    TheoryPart

    Sessional

    II

    Exam

    15% FinalExam 50%

    Quiz(6persemester) 10%

    Ass gnments 5

    Quizzes

    may

    be

    unannounced.

    There

    is

    no

    make

    up

    for

    missed

    quiz.

    Practical/LabPart Performanceorexperiments 25%

    SessionalIExam 10%

    FinalExam 50%

    Theminimumpassmarksforeachcourseshallbe50%.Studentsobtaininglessthan50%marksinanycourseshallbedeemedtohavefailedinthatcourse.

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    7/20

    ra es e er ra e re o n s ercen age ar s

    A ( Excellent) 4.0 90 and above

    A- 3.7 85-89

    B+ 3.3 80-84

    B (Good) 3.0 75-79

    B- 2.7 70-74

    C+ 2.3 65-69

    C (Average) 2.0 60-64

    C- 1.7 55-59

    D (Minimum passing) 1.3 50-54

    F (Failing) 0.0 Less than 50

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    8/20

    Course

    OutlineWeeks Topic of Lecture Reading AssignmentWeek 1 Course Overview

    Introduction to Java, History

    Chapter 1& 2

    The Java Development Environment

    Week 2 & 3 Object Oriented Concepts in Java,

    Classes, Objects, Methods

    Constructors

    Chapter 3

    Difference between OOP and procedural

    languages

    Week 4 Control Statements if, if-else, while, do-

    while, switch

    Chapter 4 & 5

    Week 5 Methods

    Unified Modeling Language

    State Diagram

    Use Case Diagram

    Chapter 6 + Handouts

    Class Diagram Activity Diagram

    Week 6 Arrays Chapter 7

    Week 7 A deeper look into Java Classes and Chapter 8 + Handouts

    Objects,

    Encapsulation and data hiding

    Data abstractionByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    9/20

    Week 8 & 9 Object Oriented Programming: Inheritance Chapter 9 + Handouts

    Week 10 Object Oriented Programming: Polymorphism Chapter 10

    Week 11 & 12 GUI components and Graphics Chapter 11 & 12

    Week 13 Exception Handling Chapter 13

    Week 14 Introduction to Java Applets Chapter 20

    Week 15 & 16 Accessing Database with JDBC Chapter 25 & Handouts

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    10/20

    required for sitting in the Final/Terminalexamination.

    attendance will receive F Graderegardless of his/her performance in

    previous exams, quizzes and assignmentsetc.

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    11/20

    CodeofConductCodeofConduct No Smoking, No Drugs

    No Arms

    Always display ID card

    w c o s en mo e p onein class rooms

    Abide by dress code

    Avoid noise in the class room

    Avoid political and religiousdiscussions

    Believing in earning reward

    through hard work

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    12/20

    Machine,AssemblyandHighLevel

    Languages MachineLanguage

    (1,0) Cumbersomeforhumans

    Assembl Lan ua e Englishlikeabbreviations Needtranslatorcalledassembler , ,

    HighLevelLanguages NeedCompilerstoconvertHLLtomachinelanguage

    Mostpreferable C,C++,.NETlanguages(e.g.,VisualBasic,VisualC++andC#),

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    13/20

    C C++ Java1972 Early

    1980s 1995

    DennisRitchie(Bell Bjarne JamesGosling(SunLaboratories)

    UNIXOS Capabilitiesof Generalpurpose

    language

    Programming

    HybridLanguageC Ob ect

    ObjectOriented Writeonce,run

    an where

    OrientedStyle)

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    14/20

    IntroductiontoObjectOriented

    Programming

    developmentlanguage

    Implementationatjava.sun.com/j2se ObjectOrientedProgramming

    Portable com uter ro ramswritteninthe

    Javalanguagemustrunsimilarlyonany

    hardware/o eratin s stem latform .

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    15/20

    JamesGosling,MikeSheridan,andPatrickNaughton initiatedtheJavalanguageprojectinJune1991.

    Javawasoriginallydesignedforinteractivetelevision,butitwastooadvancedforthedigitalcable

    .

    ThelanguagewasinitiallycalledOakafteranoaktreethatstoodoutsideGosling'soffice;itwentbythe

    nameGreen later,andwaslaterrenamedJava,fromJavacoffee,saidtobeconsumedinlargequantities

    b the lan ua e's creators.

    SunMicrosystemsreleasedthefirstpublicimplementationasJava1.0in1995.Itpromised"WriteOnce,

    Run

    Anywhere"

    (WORA),

    providing

    no

    cost

    run

    times

    on

    popular

    platforms.

    WiththeadventofJava2 ,newversionshadmultipleconfigurationsbuiltfordifferenttypesofplatforms.Forexample,J2EEtargetedenterpriseapplicationsandthegreatlystrippeddownversionJ2MEformobile

    applications(MobileJava).J2SEdesignatedtheStandardEdition.

    In2006,formarketingpurposes,SunrenamednewJ2 versionsasJavaEE,JavaME,andJavaSE,respectively.

    In2007,SunmadetheJava'scorecodeavailableunderfreesoftware/opensourcedistributionterms.

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    16/20

    Itshouldbe"simple,object

    orientedandfamiliar".

    ers ons

    MajorreleaseversionsofJava,

    alon withtheirreleasedates:

    It

    should

    be

    "robust

    and

    secure". JDK1.0(January23,1996)

    JDK1.1(February19,1997)

    s ou e arc ec ureneutralandportable".

    Itshouldexecutewith"hi h

    J2SE1.2(December8,1998)

    J2SE1.3(May8,2000)

    performance".

    Itshouldbe"interpreted,

    . ,

    J2SE5.0(September30,2004)

    JavaSE6(December11,2006)

    rea e ,an ynam c . JavaSE7(July28,2011)

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    17/20

    B n fit f Java t Pr rammin C mm nit SupportGUIsandmultimediacapabilitiessuchas

    graphics,images,animation,audioandvideo.

    unon n erne an commun ca ew o erapplications

    Applications cantakeadvantageoftheflexibilityandperformanceimprovementsofmultithreading

    Applicationswithricherfileprocessingthanisrovidedb CorC++.

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    18/20

    B n fit f Java t Pr rammin C mm nit Notlimitedtothedesktoporeventosomelocalcomputernetwork,butcanintegrateInternetcomponentsandremote

    databasesaswell.

    pp ca ons a can ewr enqu c yan correc y namannerthattakesadvantageofprebuiltsoftware

    components.

    Easyaccesstoagrowinguniverseofreusablesoftware

    componen s.

    manner,sothatapplicationswillrunwithoutmodificationon

    avarietyofplatforms ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    19/20

    //Thisisanexampleofasinglelinecommentusingtwoslashes/*Thisisanexampleofamultiplelinecommentusingtheslashandasterisk.

    Thistypeofcommentcanbeusedtoholdalotofinformationordeactivate .

    /**

    *ThisisanexampleofaJavadoc comment;Javadoc cancompiledocumentation*fromthistext.*/

    classHelloWorldApp {

    publicstaticvoidmain(String[]args){System.out.println("Hello World!");//Displaythestring.

    }

    ByDr.TabbasumNaz

  • 8/4/2019 OOCP Lecture 1_2

    20/20

    ByDr.TabbasumNaz