OOP Lecture 1

download OOP Lecture 1

of 20

Transcript of OOP Lecture 1

  • 8/3/2019 OOP Lecture 1

    1/20

    ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    2/20

    ObjectOriented

    Concepts

    and

    Programming

    (CSC244)

    By

    Dr.Tabbasum Naz

    ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    3/20

    C r lin

    Course Title Object Oriented Concepts andProgramming

    Ob ect Oriented Pro rammin

    Course Code CSC244/CSC241

    Credit Hours 4(3,1)

    Resource Person Dr. Tabbasum Naz

    Contact Hours (Theory) 3 hours per week

    Contact Hours (Lab) ours per weeOffice Hours Shall be communicated later

    Email [email protected]

    ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    4/20

    GENERALOVERVIEW ThiscourseprovidesanintroductiontotheconceptsandmethodologyofObject

    OrientedPro rammin withJavaasanillustrationlan ua e.

    Coursealsohelpstudentstoimplementobjectorientedconceptsinthelabkeepinginmindtherealworldproblems.

    Understandmajorconceptsofobjectorientedprogramming

    KnowledgeandskillsinOOdesignandprogramdevelopment

    Experiencein

    Java

    programming

    and

    program

    development

    within

    an

    integrated

    developmentenvironment

    Certainskillsinusinggraphicaluserinterface

    TopicscoveredinthiscourseprovideafoundationformoreadvancedcoursesinComputerScience

    ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    5/20

    TEXTBOOKJava

    How

    to

    Program,

    by

    Deitel &

    Deitel,

    7th Edition

    RECOMMENDEDBOOKS Java2:TheCompleteReference,byPatrickNaughton

    andHerbertSchildt

    th

    ,

    ,

    Edition, 2006

    Be innin Java2b Ivor Horton

    ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    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/3/2019 OOP Lecture 1

    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/3/2019 OOP Lecture 1

    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/3/2019 OOP Lecture 1

    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/3/2019 OOP Lecture 1

    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/3/2019 OOP Lecture 1

    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/3/2019 OOP Lecture 1

    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/3/2019 OOP Lecture 1

    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/3/2019 OOP Lecture 1

    14/20

    IntroductiontoObjectOriented

    Programming

    developmentlanguage

    Implementationat

    java.sun.com/j2se

    ObjectOrientedProgramming

    Portable com uter ro ramswritteninthe

    Javalanguage

    must

    run

    similarly

    on

    any

    hardware/o eratin s stem latform .

    ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    15/20

    JamesGosling,MikeSheridan,andPatrickNaughton initiatedtheJavalanguageprojectinJune1991.

    Javawasoriginallydesignedforinteractivetelevision,butitwastooadvancedforthedigitalcable.

    ThelanguagewasinitiallycalledOakafteranoaktreethatstoodoutsideGosling'soffice;itwentbythenameGreen 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,

    for

    marketing

    purposes,

    Sun

    renamed

    new

    J2 versions

    as

    JavaEE,JavaME,andJavaSE,

    respectively.

    In2007,SunmadetheJava'scorecodeavailableunderfreesoftware/opensourcedistributionterms.

    ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    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 ure

    neutralandportable".

    Itshould

    execute

    with

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

    SE

    7(July

    28,

    2011)

    ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    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/3/2019 OOP Lecture 1

    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

    avariety

    of

    platforms ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    19/20

    //Thisisanexampleofasinglelinecommentusingtwoslashes/*Thisisanexampleofamultiplelinecommentusingtheslashandasterisk.

    Thistypeofcommentcanbeusedtoholdalotofinformationordeactivate .

    /**

    *ThisisanexampleofaJavadoc comment;Javadoc cancompiledocumentation*fromthistext.*/

    classHelloWorldApp {

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

    }

    ByDr.TabbasumNaz

  • 8/3/2019 OOP Lecture 1

    20/20

    ByDr.TabbasumNaz