0% found this document useful (0 votes)
73 views60 pages

Week 1 OOP

Uploaded by

j.roziboyev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views60 pages

Week 1 OOP

Uploaded by

j.roziboyev
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 60

OOP

Object Oriented Programming Course, CS211


Dr. Sirojiddin Jo’raev
About me
• Background
• B.Sc: Tashkent University of Information Technology (TUIT)
• Master: Yeungnam University, South Korea
• PhD: Yeungnam University, South Korea
• Working Experience
• New Uzbekistan University, Assistant Professor 2021~ Present
• Computer Network Lab Research Assistant and Teaching Assistant
2011-2021
• Korean Center, Researcher 2011
Contact information
• Contact details: [email protected]
• Office hours: Monday 10AM ~11AM, Tuesday 10AM ~ 11AM
• Office : 6th floor, room #613
Basic course information
Subject Object Oriented Programming, CS211
ECTS Credits 6
Content Introduction to Programming and Java.
Introduction to Java Applications.
Objects and Classes.
Inheritance and interfaces in Java.
Polymorphism. Lifecycle of Objects.
The SOLID principles of OOP and Design Patterns.
GUI components in Java (Java FX)
JAVA Relationship Database Development, JDBC
The Collections Framework
Prerequisites Introduction to Programming, C201
Textbooks and reference books
• Liang Y.D. - Introduction to Java Programming and Data
Structures, Comprehensive Version, 12th edition – 2020
• Java How to Program, Early Objects, Harvey Deitel
• Head First Java 2nd edition, Bert Bates and Kathy Sierra
• Object-Oriented Software Engineering Using UML, Patterns,
and Java™, 3rd edition, Bernd Bruegge & Allen H. Dutoit
Grading Criteria
Grading criteria Total points
Midterm 20 points
Final 30 points
Homework 15 points
Lab/Assignments 10 points
Team Project 25 points
Total 100 points
Team Project and Assignments
• All individual assignments should be submitted through GitHub
account. There are total 3 homework till Midterm.
• There will be team project that each team will pick up their own
projects.
• Students will be required to form themselves into 5 ~ 6 pairs of
members each.
Class policies
• Students are responsible for all missed work, regardless of the
reason for absence.
• Homework deadline usually one week from assigned time. I will not
accept any homework after deadline. There is no single point after
deadline.

You have only two free extension (Late days)
Honor Code
• Don’t share your code
• If you share your code, you and other person will get 0 point
• Don’t copy single line of code from anyone
• You can discuss about assignment as much as you want.
• You can ask suggestion as much as you want.
• You can come to my office during office hours discuss the issue.
Attendance

75%
Tools
• IntelliJ IDEA Community Edition-open source and free

• StarUML is open source a software engineering tool for system


modeling using the Unified Modeling Language

• You can use university computers or personal computer

• We use GitHub to submit homework and assignments


Today’s topic
• Introduction to Programming and Java.
• What is an OOP?
• About Java What is it Why Java and When to use Java? SDK ?
Framework?
• Typical Java development Environment.
• Software Technologies
• Basic Input/Output and Operators
• Values, Variables, Types, Primitive types.
• Types
• Methods
Who is this course for?
• Have you done some programming?
• Do you want to learn OOP using Java?
• Do you prefer typing code and understand
how it works why it works and why it
doesn't work ?
• Do you want to learn how to manage and
work with team?
Who started it ?
• Ivan Sutherland’s seminal Sketchpad application was
an early inspiration for OOP, created between 1961
and 1962 and published in his Sketchpad Thesis.
• Any object could become a ”master” and additional
instances of the objects were called ”occurrance”.
Who invented Objects, Classes, and
Inheritance
• Simula was developed in the 1965
at the Norwegian Computing
Center in Oslo, by Ole-Johan Dahl
and Kristen Nygaard.

• Like Sketchpad, Simula featured


objects, and eventually introduced
classes, class inheritance,
subclasses, and virtual methods.
(c) Wikipedia
Who coined “OOP”?
• Smalltalk was created in the 1970s at
Xerox PARC by Learning Research
Group (LRG) scientists, including
• Alan Kay, Dan Ingalls, Adele Goldberg,
Ted Kaehler, Diana Merry, and Scott
Wallace.
Who make popular OOP?
• C++ was created by Danish computer
scientist Bjarne Stroustrup in 1985, by
enhancing C language.
• C was chosen because it was general-
purpose, fast, portable and widely used.
What happened next?
• C++ was released in 1985. And • JavaScript 1995
then... • Ruby 1995
• Erlang 1986 • Java 1995
• Eiffel 1986 • Go 1995
• Self 1987 • PHP3 1998
• Perl 1988 • C# 2000
• Haskell 1990 • Rust 2010
• Python 1991 • Swift 2014
• Lua 1993
Incomplete list of OOP features, so far:
• Polymorphism • Operators • Synchronization • Modules
• Nested Objects • Methods • Macros • Type Aliases
• Traits • Static Blocks • Inheritance • Decorators
• Templates • Virtual Tables • Overloading • Lambda Functions
• Generics • Coroutines • Encapsulation • Multiple
• Invariants • Annotations • Access Modifiers Inheritance
• Classes • Interfaces • Pattern Matching • Events
• NULL • Constructors • Enumerated Types • Callbacks
• Exceptions • Destructors • Namespaces • NULL Safety
• Immutability
Why use OOP?
• Object Oriented Programming is one of the most widely used
programming paradigm.
• Well suited for building trivial and complex application
• Allows re-use of code thereby increasing productivity
• New features can be easyly built into the existing code
• Reduced production cost and maintenance cost
Why JAVA?
How
Java
Works?

Source Code
The compiler creates a
Run your document new document, coded in to
through the compiler Java bytecode The vertual
machine reads
and runs bytecode
Breif history of Java

• © https://thetapacademy.com/
Difference between JVM, JRE, and JDK

• © https://thetapacademy.com/
Introduction to Object Technology
• The Automobile as an Object
Introduction to Object Technology
• Methods and Classes
• Performing a task in a program requires a
method.
• We create a program unit called a class to
house the set of methods the classes task
• Class is blueprint for objects.
The UML (Unified Modeling Language)
• The goal of UML is to provide a standard
notation that can be used by all object-
oriented programming languages.
• UML has been designed for a broad range of
applications.
A Typical Java Development Environment
• Phase 1: Creating a Program
• Integrated development environments (IDEs) provide tools that
support the software development process, such as editors,
debuggers for locating logic errors and more.
• There are many popular Java IDEs, including:
• Eclipse (www.eclipse.org)
• NetBeans (www.netbeans.org)
• IntelliJ IDEA (www.jetbrains.com)

Compiling a Java Program into Bytecodes
• The Java compiler translates Java source code into bytecodes that
represent the tasks to execute in the execution phase
• Bytecode instructions are platform independent.
Software Technologies
Software Technology Description
Agile software development is a set of methodologies that try to get soft-
Agile software development ware implemented faster and using fewer resources.
Refactoring involves reworking programs to make them clearer and easier to
Refactoring maintain while preserving their correctness and functionality. Many IDEs contain
built-in refactoring tools to do major portions of the reworking automatically.
Design patterns are proven architectures for constructing flexible and maintainable
object-oriented software. The field of design patterns tries to enumerate those
Design patterns recurring patterns, encouraging software designers to reuse them to develop better-
quality software using less time, money and effort.

LAMP is an acronym for the open-source technologies that many developers use to
LAMP build web applications—it stands for Linux, Apache, MySQL and
PHP (or Perl or Python—two other scripting languages)
Software Technologies
Software Technology Description

Platform as a Service Platform provides a computing platform for developing Service (PaaS) and running
(PaaS) applications as a service over the web, rather than installing the tools on your
computer. Some PaaS providers are Google App Engine, Amazon EC2 and Windows
AzureTM.

Software as a Service The software runs on servers elsewhere on the Internet. When that server is updated, all
(SaaS) clients worldwide see the new capabilities—no local installation is needed. Google,
and Microsoft’s Office Live and Windows Live all offer SaaS.
Your First Program in Java: Printing a Line of Text
Comments
Compute Expression
Programming Errors: Common
Programming Errors: Runtime Error
Programming Errors: Logic Errors

What is the output of expression ?


Programming Errors: Logic Errors
Reading Input from the Console
Identifiers
• Identifiers are the names that identify the elements such as classes,
methods, and variables in a program.
• An identifier is a sequence of characters that consists of letters, digits,
underscores (_), and dollar signs ($).
• An identifier must start with a letter, an underscore (_), or a dollar sign ($). It
cannot start with a digit.
• An identifier cannot be a reserved word. (public, int, static, void etc.…)
• An identifier cannot be true, false, or null.
• An identifier can be of any length.
Variables
Named Constants
• final datatype CONSTANTNAME = value;
Numeric Data Types and Operations
Numeric Operators
If today is Tuesday,
what will be the day in 100 days?

You might also like