1 / 28

Object Oriented Programming

Object Oriented Programming. Ch1. Intro to OOP. Lecture 1. Iksan Bukhori, M.Phil. iksan.bukhori@president.ac.id. 2018. Textbook and Syllabus. Textbook: Wu, C. Thomas. An Introduction to Object-Oriented Programming With Java . MCGraw-Hill : New York, USA. 2010.

lsutton
Télécharger la présentation

Object Oriented Programming

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. Object Oriented Programming Ch1. Intro to OOP Lecture 1 Iksan Bukhori, M.Phil iksan.bukhori@president.ac.id 2018

  2. Textbook and Syllabus Textbook: • Wu, C. Thomas. An Introduction to Object-Oriented Programming With Java. MCGraw-Hill: New York, USA. 2010. • Deitel, H. M. & Deitel, P. J. JAVA How to Program (Seventh Edition). Pearson Education, Inc.: New Jersey, USA. 207. Syllabus: (tentative) Chapter 1: Intro to OOP Chapter 2: Getting Started with Java Chapter 3: Numerical Data Chapter 4: Defining Your Own Classes – Part 1 Chapter 5: Selection Statements Chapter 6: Repetition Statements Chapter 7: Defining Your Own Classes – Part 2 Chapter 10: Arrays and Collections

  3. Grade Policy Grade Point: 85 – 100 : A (GPA = 4) 70 – 84 : B (GPA = 3) 60 – 69 : C (GPA = 2) 55 – 59 : D (GPA = 1) 0 – 54 : E (GPA = 0) • Always bring a laptop installed with IDE to class. • The use of smartphone in quizzes and exams is prohibited.

  4. Grade Policy Grades: Final Grade = 10% Homeworks + 20% Quizzes + 30% Midterm Exam + 40% Final Exam + Extra Points • Homeworks will be given in fairly regular basis. The average of homework grades contributes 10% of final grade. • Written homeworks are to be written on A4 papers, otherwise they will not be graded. • Programming homework should follow these rules • Homeworks must be submitted on time, ten minutes after the class begins. If you submit late, the penalty will be –10·n points, where n is the total number of lateness made.

  5. Grade Policy • Extra points will be given if you solve a problem in front of the class. You will earn 1, 2, or 3 points. • Make up of quizzes and exams will be held withinone week after the schedule of the respective quizzes and exams. • To maintain the integrity, the maximum score of a make up quiz or exam can be set to 90. • Any project/homework given should not be plagiarizing existing programs available on the internet. If that is the case, no grade shall be given. • The grade for any program (either on paper or not) will be divided by the number of students having the same program.

  6. Lecture Activities • Lectures will be held in the form of PowerPoint presentations. • You are expected to write a note along the lectures to record your own conclusions or materials which are not covered by the lecture slides. How to get good grades in this class? • Do the homeworks by yourself • Take time to learn at home • Ask questions

  7. Introduction: Computer Organization

  8. Programming Languages

  9. JAVA Development Environment

  10. JAVA Development Environment : -Eclipse -Netbeans -Jcreator -etc.

  11. OOP: Classes and Objects OBJECT OBJECT Interaction Example of Objects: • Arwin • Wilbert • A door

  12. OOP: Classes and Objects Class: Student Class: Wood Furniture Arwin Wilbert Objectsare instances of class of certain types. Door

  13. Object and Classes in Unified Modelling Language (UML)

  14. Object and Classes in Unified Modelling Language (UML)

  15. Messages and Method Message: What is sent to an object or a class to perform certain task Shout (15) John Doe: Student Shout (15) ? Door: Wood Furniture Method: How an object or a class do the task

  16. Instance Method One-way Comm Two-way Comm

  17. Class Method

  18. Class and Instance Data Values IDV

  19. Class Data Values vs Instance Data Values IDV What happens when the bank wants to change minimum balance?

  20. Class Data Values vs Instance Data Values CDV

  21. Variable and Constant Data Values

  22. Class Representation in UML Book Class name • Title: String • Author: String • Category: String • Year Published: Integer=1945 Instance variables/Instance Data Values • getDueDate() • isAvailable() Class Operations/Instance Methods

  23. Exercise

  24. Inheritance Graduate Undergraduate Features = = Using a single class to describe two or more entities is a bad design !!

  25. Inheritance Superclass/ancestor/base class Subclass/descendant/derived class

  26. Software Life Cycle

  27. Homework • Graphically represents a person class with • Instance variables name, age, and gender. • Instance methods setName, getName, and getAge • Class method getAverageAge • Consider a student registration program used by the registrar’s office. The program keeps track of students who are registered for a given semester. For each student registered, the program maintains the student’s name, address, and phone number; the number of classes in which the student is enrolled; and the student’s total credit hours. The program also keeps track of the total number of registered students. Define instance and class variables of a Student class that is suitable for this program. • Suppose the minimum number and maximum number of courses for which a student can register are different depending on whether the student is a graduate, undergraduate, or work/study student. Redo Exercise 2 by defining classes for different types of students. Relate the classes, using inheritance.

  28. Next Week • Getting started with Java Do Not Forget to Prepare your IDE!

More Related