Enviar pesquisa
Carregar
Oop lecture1
•
Transferir como PPT, PDF
•
0 gostou
•
312 visualizações
Shahriar Robbani
Seguir
Educação
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 10
Baixar agora
Recomendados
Concept of c
Concept of c
Rohan Gajre
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
kinan keshkeh
Tech Talks @NSU: DLang: возможности языка и его применение
Tech Talks @NSU: DLang: возможности языка и его применение
Tech Talks @NSU
CS106 Lab 10 - Functions (passing by value)
CS106 Lab 10 - Functions (passing by value)
Nada Kamel
Matlab integration
Matlab integration
pramodkumar1804
Compile time polymorphism
Compile time polymorphism
ForwardBlog Enewzletter
Polymorphism
Polymorphism
Kumar Gaurav
C++ & Java JIT Optimizations: Finding Prime Numbers
C++ & Java JIT Optimizations: Finding Prime Numbers
Adam Feldscher
Recomendados
Concept of c
Concept of c
Rohan Gajre
2Bytesprog2 course_2014_c1_sets
2Bytesprog2 course_2014_c1_sets
kinan keshkeh
Tech Talks @NSU: DLang: возможности языка и его применение
Tech Talks @NSU: DLang: возможности языка и его применение
Tech Talks @NSU
CS106 Lab 10 - Functions (passing by value)
CS106 Lab 10 - Functions (passing by value)
Nada Kamel
Matlab integration
Matlab integration
pramodkumar1804
Compile time polymorphism
Compile time polymorphism
ForwardBlog Enewzletter
Polymorphism
Polymorphism
Kumar Gaurav
C++ & Java JIT Optimizations: Finding Prime Numbers
C++ & Java JIT Optimizations: Finding Prime Numbers
Adam Feldscher
C lab excellent
C lab excellent
Srinivas Reddy Amedapu
Periodic test
Periodic test
Amit Mishra
CS2106 Tutorial 2
CS2106 Tutorial 2
Wei Tsang Ooi
C# Overriding
C# Overriding
Prem Kumar Badri
Pslb lab manual
Pslb lab manual
Vivek Kumar Sinha
SHA1 collision analysis and resolving a problem of recursive hashing with xra...
SHA1 collision analysis and resolving a problem of recursive hashing with xra...
Diego Hernan Marciano
halstead software science measures
halstead software science measures
Deepti Pillai
Lessons learned from functional programming
Lessons learned from functional programming
BryceLohr
PyCon Ukraine 2016: Maintaining a high load Python project for newcomers
PyCon Ukraine 2016: Maintaining a high load Python project for newcomers
Viach Kakovskyi
Program persamaan kuadrat
Program persamaan kuadrat
linda_rosalina
Speaker Diarization
Speaker Diarization
HONGJOO LEE
Tail Recursion in data structure
Tail Recursion in data structure
Rumman Ansari
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
Radha Maruthiyan
Learn C# Programming Polymorphism & Operator Overloading
Learn C# Programming Polymorphism & Operator Overloading
Eng Teong Cheah
Analysis of algo
Analysis of algo
Sandeep Bhargava
Removal Of Recursion
Removal Of Recursion
Richa Sharma
Cilk - An Efficient Multithreaded Runtime System
Cilk - An Efficient Multithreaded Runtime System
Shareek Ahamed
Rcpp11 useR2014
Rcpp11 useR2014
Romain Francois
Ankita sharma focp
Ankita sharma focp
AnkitaSharma463389
CS106 Lab 11 - Functions (passing by reference)
CS106 Lab 11 - Functions (passing by reference)
Nada Kamel
Oop lecture2
Oop lecture2
Shahriar Robbani
Presentacion viernes 20 [compatibility mode]
Presentacion viernes 20 [compatibility mode]
edyarr
Mais conteúdo relacionado
Mais procurados
C lab excellent
C lab excellent
Srinivas Reddy Amedapu
Periodic test
Periodic test
Amit Mishra
CS2106 Tutorial 2
CS2106 Tutorial 2
Wei Tsang Ooi
C# Overriding
C# Overriding
Prem Kumar Badri
Pslb lab manual
Pslb lab manual
Vivek Kumar Sinha
SHA1 collision analysis and resolving a problem of recursive hashing with xra...
SHA1 collision analysis and resolving a problem of recursive hashing with xra...
Diego Hernan Marciano
halstead software science measures
halstead software science measures
Deepti Pillai
Lessons learned from functional programming
Lessons learned from functional programming
BryceLohr
PyCon Ukraine 2016: Maintaining a high load Python project for newcomers
PyCon Ukraine 2016: Maintaining a high load Python project for newcomers
Viach Kakovskyi
Program persamaan kuadrat
Program persamaan kuadrat
linda_rosalina
Speaker Diarization
Speaker Diarization
HONGJOO LEE
Tail Recursion in data structure
Tail Recursion in data structure
Rumman Ansari
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
Radha Maruthiyan
Learn C# Programming Polymorphism & Operator Overloading
Learn C# Programming Polymorphism & Operator Overloading
Eng Teong Cheah
Analysis of algo
Analysis of algo
Sandeep Bhargava
Removal Of Recursion
Removal Of Recursion
Richa Sharma
Cilk - An Efficient Multithreaded Runtime System
Cilk - An Efficient Multithreaded Runtime System
Shareek Ahamed
Rcpp11 useR2014
Rcpp11 useR2014
Romain Francois
Ankita sharma focp
Ankita sharma focp
AnkitaSharma463389
CS106 Lab 11 - Functions (passing by reference)
CS106 Lab 11 - Functions (passing by reference)
Nada Kamel
Mais procurados
(20)
C lab excellent
C lab excellent
Periodic test
Periodic test
CS2106 Tutorial 2
CS2106 Tutorial 2
C# Overriding
C# Overriding
Pslb lab manual
Pslb lab manual
SHA1 collision analysis and resolving a problem of recursive hashing with xra...
SHA1 collision analysis and resolving a problem of recursive hashing with xra...
halstead software science measures
halstead software science measures
Lessons learned from functional programming
Lessons learned from functional programming
PyCon Ukraine 2016: Maintaining a high load Python project for newcomers
PyCon Ukraine 2016: Maintaining a high load Python project for newcomers
Program persamaan kuadrat
Program persamaan kuadrat
Speaker Diarization
Speaker Diarization
Tail Recursion in data structure
Tail Recursion in data structure
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
CS6311- PROGRAMMING & DATA STRUCTURE II LABORATORY
Learn C# Programming Polymorphism & Operator Overloading
Learn C# Programming Polymorphism & Operator Overloading
Analysis of algo
Analysis of algo
Removal Of Recursion
Removal Of Recursion
Cilk - An Efficient Multithreaded Runtime System
Cilk - An Efficient Multithreaded Runtime System
Rcpp11 useR2014
Rcpp11 useR2014
Ankita sharma focp
Ankita sharma focp
CS106 Lab 11 - Functions (passing by reference)
CS106 Lab 11 - Functions (passing by reference)
Destaque
Oop lecture2
Oop lecture2
Shahriar Robbani
Presentacion viernes 20 [compatibility mode]
Presentacion viernes 20 [compatibility mode]
edyarr
Oop lecture6
Oop lecture6
Shahriar Robbani
Calendario portada
Calendario portada
Isabel Jb
Cwgd
Cwgd
cwgday
Oop lecture8
Oop lecture8
Shahriar Robbani
Oop lecture9 12
Oop lecture9 12
Shahriar Robbani
Oop lecture9 13
Oop lecture9 13
Shahriar Robbani
Oop lecture9 11
Oop lecture9 11
Shahriar Robbani
Destaque
(9)
Oop lecture2
Oop lecture2
Presentacion viernes 20 [compatibility mode]
Presentacion viernes 20 [compatibility mode]
Oop lecture6
Oop lecture6
Calendario portada
Calendario portada
Cwgd
Cwgd
Oop lecture8
Oop lecture8
Oop lecture9 12
Oop lecture9 12
Oop lecture9 13
Oop lecture9 13
Oop lecture9 11
Oop lecture9 11
Semelhante a Oop lecture1
java-programming.pdf
java-programming.pdf
Prof. Dr. K. Adisesha
OOP with Java - continued
OOP with Java - continued
RatnaJava
Java file
Java file
Divya Nain
Wap to implement bitwise operators
Wap to implement bitwise operators
Harleen Sodhi
Java programs
Java programs
Dr.M.Karthika parthasarathy
C language
C language
Priya698357
Java PSkills Session-6 PNR.pptx
Java PSkills Session-6 PNR.pptx
ssuser99ca78
39927902 c-labmanual
39927902 c-labmanual
Srinivasa Babji Josyula
39927902 c-labmanual
39927902 c-labmanual
Srinivasa Babji Josyula
06slide.ppt
06slide.ppt
RohitNukte
JAVAPGMS.docx
JAVAPGMS.docx
Mgm Mallikarjun
C++ Template
C++ Template
Saket Pathak
Java Lab Manual
Java Lab Manual
Naveen Sagayaselvaraj
Presentation1 computer shaan
Presentation1 computer shaan
walia Shaan
20.1 Java working with abstraction
20.1 Java working with abstraction
Intro C# Book
Java Question-Bank-Class-8.pdf
Java Question-Bank-Class-8.pdf
Aditya Kumar
Java practical(baca sem v)
Java practical(baca sem v)
mehul patel
11slide.ppt
11slide.ppt
MohammedNouh7
(chapter 5) A Concise and Practical Introduction to Programming Algorithms in...
(chapter 5) A Concise and Practical Introduction to Programming Algorithms in...
Frank Nielsen
Data structures
Data structures
Khalid Bana
Semelhante a Oop lecture1
(20)
java-programming.pdf
java-programming.pdf
OOP with Java - continued
OOP with Java - continued
Java file
Java file
Wap to implement bitwise operators
Wap to implement bitwise operators
Java programs
Java programs
C language
C language
Java PSkills Session-6 PNR.pptx
Java PSkills Session-6 PNR.pptx
39927902 c-labmanual
39927902 c-labmanual
39927902 c-labmanual
39927902 c-labmanual
06slide.ppt
06slide.ppt
JAVAPGMS.docx
JAVAPGMS.docx
C++ Template
C++ Template
Java Lab Manual
Java Lab Manual
Presentation1 computer shaan
Presentation1 computer shaan
20.1 Java working with abstraction
20.1 Java working with abstraction
Java Question-Bank-Class-8.pdf
Java Question-Bank-Class-8.pdf
Java practical(baca sem v)
Java practical(baca sem v)
11slide.ppt
11slide.ppt
(chapter 5) A Concise and Practical Introduction to Programming Algorithms in...
(chapter 5) A Concise and Practical Introduction to Programming Algorithms in...
Data structures
Data structures
Mais de Shahriar Robbani
Group111
Group111
Shahriar Robbani
SQL
SQL
Shahriar Robbani
Oop lecture9 10
Oop lecture9 10
Shahriar Robbani
Oop lecture4
Oop lecture4
Shahriar Robbani
Oop lecture9
Oop lecture9
Shahriar Robbani
Oop lecture7
Oop lecture7
Shahriar Robbani
Oop lecture5
Oop lecture5
Shahriar Robbani
Oop lecture3
Oop lecture3
Shahriar Robbani
Mais de Shahriar Robbani
(8)
Group111
Group111
SQL
SQL
Oop lecture9 10
Oop lecture9 10
Oop lecture4
Oop lecture4
Oop lecture9
Oop lecture9
Oop lecture7
Oop lecture7
Oop lecture5
Oop lecture5
Oop lecture3
Oop lecture3
Último
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
Maestría en Comunicación Digital Interactiva - UNR
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
JemimahLaneBuaron
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
pragatimahajan3
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
GaneshChakor2
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
iammrhaywood
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
chloefrazer622
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
Dr. Mazin Mohamed alkathiri
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
National Information Standards Organization (NISO)
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Sapana Sha
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
dawncurless
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
TechSoup
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
SoniaTolstoy
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
eniolaolutunde
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Krashi Coaching
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
SafetyChain Software
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
Disha Kariya
Último
(20)
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
Oop lecture1
1.
Lecture 1 Object Oriented
Programming Object Oriented Programming Eastern University, Dhaka Md. Raihan Kibria
2.
Why object oriented
programming Consider the following program written in C:
3.
#include <stdio.h> #include <math.h> #include
<stdlib.h> struct cgpa{ int grades[3]; }ca; float getCgpa1(struct cgpa cgpa){ float sum = 0; int i = 0; for (i=0;i<3; i++){ sum += cgpa.grades[i]; } return sum/3; }
4.
float getCgpa2(struct cgpa
cgpa){ float sum = 0; int i = 0; for (i=0;i<3; i++){ sum += cgpa.grades[i]; } return roundf(sum/3); }
5.
float getCgpa3(struct cgpa
cgpa){ float sum = 0; int i = 0; for (i=0;i<3; i++){ sum += cgpa.grades[i]; } return abs(sum/3); } int main(){ printf ("%s", "a message to startn"); ca.grades[0] = 3; ca.grades[1] = 5; ca.grades[2] = 6; printf("%fn", getCgpa1(ca)); printf("%fn", getCgpa2(ca)); printf("%fn", getCgpa3(ca)); }
6.
OOP goals
Maximize code re-use Minimize re-coding
7.
Same program in
java public class Grade { public static void main(String[] args) { System.out.println(new Grade1().getCgpa()); System.out.println(new Grade2().getCgpa()); System.out.println(new Grade3().getCgpa()); } } class Grade1{ int[] grades = {3,5,6}; float sum; protected void calculateSum(){ for (int i=0; i<grades.length; i++) sum += grades[i]; } public float getCgpa(){ calculateSum(); return sum / grades.length; } } class Grade2 extends Grade1{ public float getCgpa(){ calculateSum(); return Math.round(sum / grades.length); } } class Grade3 extends Grade1{ public float getCgpa(){ calculateSum(); return (float)Math.floor(sum / grades.length ); } }
8.
How to start
programming in OOP Class A class is a template //a student public class ClassDemo { String code; String name; }
9.
Entry point public static
void main(String[] args) {} e.g. //a student public class ClassDemo { String code; String name; public static void main(String[] args){ ClassDemo demo = new ClassDemo(); demo.code = "1221232323"; demo.name = "Raihan Kibria"; System.out.println(demo.code); System.out.println(demo.name); } }
10.
How to compile Install
jdk Compile: javac ClassDemo.java How to run: java ClassDemo
Baixar agora