The document is a series of slides from a YouTube lecture on object-oriented programming (OOP) concepts by Zarif Bahaduri. It introduces key OOP topics like classes, objects, methods, and access modifiers. It defines classes as blueprints for objects and describes how objects are instances of classes. Methods are functions that operate on objects, and access modifiers like public and private control which class members are accessible. The slides provide examples and further explain concepts like constructors, inheritance, and the difference between procedural and object-oriented languages.
This document provides an overview of the topics covered in a class on basic methods and classes. It includes discussions on Grace Hopper's development of the first computer language COBOL, goals for the class such as demonstrating classes and objects, and important exam information. A pizza project design example demonstrates how classes work together, with one class calculating pizza attributes. The document also covers key concepts like class variables, constructors, methods, the this keyword, and writing tests. It emphasizes modular development and incremental coding with testing. Students are reminded to review materials and labs in preparation for the upcoming Exam 1.
This document provides an introduction to object-oriented programming concepts like classes, structures, encapsulation, and constructors. It begins with an overview of structures as a way to define custom data types containing multiple data fields. Classes are then introduced as an enhanced version of structures that can also contain member functions. The document demonstrates how to define classes with public and private members, and how to initialize class objects using default and parameterized constructors. It provides examples of defining classes to represent concepts like a date or calculator.
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"Christopher Hamm
My project combines open source technologies of Tensorflow with major computer vision model to create a powerful computer vision API. In the project, it can evaluate confidence levels for each labels using good training data. The practical application example will include the computer vision API integrated with a Selenium test script setup. The end result is a robust visual testing tool that can determine if a page compares better to a working state vs a failing state.
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...Jarek Wilkiewicz
The document provides an overview of building video apps using YouTube APIs. It discusses the life cycle of a video on YouTube including uploading, sharing, searching and playback. It then covers the Google Data APIs and Player APIs that apps can use to access YouTube video data and control video playback. The document provides code examples for common tasks like uploading, searching and playing videos. It also showcases several existing apps that integrate YouTube videos and discusses important considerations like terms of service compliance.
This presentation targets people implementing Odoo and making custom developments. During this presentation, you will learn how Odoo Studio can be used as a prototyping tool for developers. More specifically, you will understand how to use it to prepare custom developments and how it will help you save both time & money.
Discover all the different features of Odoo Studio and how they will make your work easier!
Java 201 Intro to Test Driven Development in Javaagorolabs
This document provides an overview and agenda for a Java 201 course on test-driven development (TDD) in Java. It introduces TDD workflows and concepts like the feedback loop and test frameworks. The agenda covers setting up an IDE, writing the first unit test, test anatomy, and concludes with a hands-on exercise to build components of a card game using TDD.
1. Inheritance allows new classes called derived classes to be created from existing classes called base classes. Derived classes inherit all features of the base class and can add additional features.
2. An Employee base class was created to represent common properties of all employee types. HourlyEmployee and SalariedEmployee derived classes were then created from Employee to represent specific employee types.
3. Derived classes inherit all non-private members of the base class but constructors must be explicitly called. Protected members are accessible to derived classes while private members are not.
This document provides an overview of the topics covered in a class on basic methods and classes. It includes discussions on Grace Hopper's development of the first computer language COBOL, goals for the class such as demonstrating classes and objects, and important exam information. A pizza project design example demonstrates how classes work together, with one class calculating pizza attributes. The document also covers key concepts like class variables, constructors, methods, the this keyword, and writing tests. It emphasizes modular development and incremental coding with testing. Students are reminded to review materials and labs in preparation for the upcoming Exam 1.
This document provides an introduction to object-oriented programming concepts like classes, structures, encapsulation, and constructors. It begins with an overview of structures as a way to define custom data types containing multiple data fields. Classes are then introduced as an enhanced version of structures that can also contain member functions. The document demonstrates how to define classes with public and private members, and how to initialize class objects using default and parameterized constructors. It provides examples of defining classes to represent concepts like a date or calculator.
Code Palousa presentation- "Giving Digital Eyes to your Synthetic Tests"Christopher Hamm
My project combines open source technologies of Tensorflow with major computer vision model to create a powerful computer vision API. In the project, it can evaluate confidence levels for each labels using good training data. The practical application example will include the computer vision API integrated with a Selenium test script setup. The end result is a robust visual testing tool that can determine if a page compares better to a working state vs a failing state.
YouTube APIs presentation at Facultad de Ciencias, Universidad Nacional Autón...Jarek Wilkiewicz
The document provides an overview of building video apps using YouTube APIs. It discusses the life cycle of a video on YouTube including uploading, sharing, searching and playback. It then covers the Google Data APIs and Player APIs that apps can use to access YouTube video data and control video playback. The document provides code examples for common tasks like uploading, searching and playing videos. It also showcases several existing apps that integrate YouTube videos and discusses important considerations like terms of service compliance.
This presentation targets people implementing Odoo and making custom developments. During this presentation, you will learn how Odoo Studio can be used as a prototyping tool for developers. More specifically, you will understand how to use it to prepare custom developments and how it will help you save both time & money.
Discover all the different features of Odoo Studio and how they will make your work easier!
Java 201 Intro to Test Driven Development in Javaagorolabs
This document provides an overview and agenda for a Java 201 course on test-driven development (TDD) in Java. It introduces TDD workflows and concepts like the feedback loop and test frameworks. The agenda covers setting up an IDE, writing the first unit test, test anatomy, and concludes with a hands-on exercise to build components of a card game using TDD.
1. Inheritance allows new classes called derived classes to be created from existing classes called base classes. Derived classes inherit all features of the base class and can add additional features.
2. An Employee base class was created to represent common properties of all employee types. HourlyEmployee and SalariedEmployee derived classes were then created from Employee to represent specific employee types.
3. Derived classes inherit all non-private members of the base class but constructors must be explicitly called. Protected members are accessible to derived classes while private members are not.
Lightning Web Components- Ep 1 - Decorators, Life Cycle Hooks and CompositionsNishant Singh Panwar
This document provides an overview of topics covered in Day 2 of a 5-day Lightning Web Components learning series, including decorators like @track and @api, component lifecycle hooks, and using getter/setter properties. Decorators are discussed for managing reactive data, exposing public properties and methods. The component lifecycle is explained, covering the constructor, connectedCallback, renderedCallback, and disconnectedCallback methods. Upcoming sessions on events, data, and additional topics are also promoted.
Static member functions can be accessed without creating an object of the class. They are used to access static data members, which are shared by all objects of a class rather than each object having its own copy. The examples show declaring a static data member n and static member function show() that prints n. show() is called through the class name without an object. Each object creation in the constructor increments n, and show() prints the updated count.
This document summarizes the key features of the TubeBuddy YouTube optimization tool. It provides productivity tools to speed up workflow, bulk processing tools to efficiently manage multiple videos, YouTube video SEO analysis and optimization features, tools to promote YouTube video channels, and data and keyword research features. TubeBuddy helps YouTube creators optimize their content, grow their channels and audiences, and more effectively manage their channels.
Java Multithreading Using Executors FrameworkArun Mehra
This document provides an overview of using executors to handle multithreading in Java. It discusses key classes and interfaces in the executors framework like Executor, ExecutorService, and Executors. Common thread pools like fixed thread pool and cached thread pool are mentioned. The document also summarizes techniques for naming threads, returning values from threads, creating daemon threads, checking thread status, terminating threads, and handling uncaught exceptions using both the thread and executor APIs. Finally, it covers scheduling tasks using both the timer/timerTask classes and executor service.
Technology-Driven Development: Using Automation and Development Techniques to...Hiroyuki Ito
This is the report presented at Agile2014 on "Experience Report" track.
「Agile2014」の「Experience Report」トラックで発表したスライドです。
Agile2014
http://agile2014.agilealliance.org/
Track information
http://agile2014.sched.org/event/356d50c44035cafe4c27c33da03c2b80#
Automation and development techniques such as Continuous Integration/Continuous Delivery, TDD (Test-Driven Development) and BDD (Behavior-Driven Development) are useful for not only efficiency but also learning and collaboration.
I explained these practices as "Technology-Driven Development".
CI/CD・TDD・BDD といった自動化技術・技術プラクティスは、業務効率化だけではなく、メンバーの成長およびコラボレーションの促進にも効果があります。
これらのプラクティスを "Technology-Driven Development" と命名・整理した資料になります。
This document provides an overview of managed beans in IBM Domino applications. It discusses key concepts such as what managed beans are, how they are configured and used, and when they make sense to use over traditional server-side JavaScript. It then outlines steps to create a basic managed bean, including creating the Java class, adding properties and getters/setters, configuring in faces-config.xml, and using the bean in an XPage. The document also covers debugging managed beans and presents an example application where managed beans would be well suited to address complexity and persistence needs.
Ready, Set, Record: Being Present and Engaging Students Online Using YouTubeJason Rhode
During this session at the 7th Annual International Symposium on Emerging Technologies for Online Learning, learn about one instructor's use of YouTube's free and easy-to-use features for recording, editing, captioning, and embedding video into his online course. An overview of the steps for recording, editing, captioning, video in YouTube will be provided as well as examples shared for various approaches for seamlessly incorporating video into any online course. While the session featured the integrated "video anywhere" YouTube features in Blackboard, the principles provided will be applicable to an online course in any learning management system. A summary of feedback survey results from students regarding their experiences with video in the course were shared as well as lessons learned by the instructor for those wishing to follow the same suggested steps for incorporating video in their own course. Accompanying presentation abstract is at http://sloanconsortium.org/conference/2014/et4online/ready-set-record-being-present-and-engaging-students-online-using-youtube and links at http://jasonrhode.com/et4online14
This document is a slide presentation about Robotium, an open source test framework for Android. The presentation discusses setting up Robotium, the limitations of standard Android testing, how Robotium addresses those limitations, and tips for using Robotium. The presentation was given by Jim White of Intertech on March 21, 2013 to provide an overview of Robotium and how it can be used to write automated tests for Android applications.
The document discusses learning objectives and functions of the Tegrity and EnsembleVideo video platforms. The objectives are to differentiate between the platforms, understand their best educational uses, and be able to use basic functions. Tegrity allows recording of class sessions including voice, screen, and video, while EnsembleVideo is for uploading and distributing existing videos. Basic Tegrity functions include recording and hosting videos, while EnsembleVideo allows uploading and publishing videos.
This document provides an overview of test automation using Selenium. It discusses reasons to automate testing such as supporting regression testing and finding defects missed by manual testing. It also discusses when not to automate, such as when an application's behavior is unstable. The document then covers the Selenium framework, its components like Selenium IDE and WebDriver, and languages it supports like Java. It also discusses concepts in object-oriented programming relevant to test automation like classes, objects, inheritance and more.
Android Application WebAPI Development TrainingOESF Education
OESF Authorized Training Course official textbook
Course: Android Application WebAPI Development Training
FULL VERSION
Language: English
Contributed by
Created by: Leading Edge Co.,Ltd.
Translated by: ISB Vietnam Co.,Ltd.
[Attention!]
This textbook is licensed under the Creative Commons License BY-NC-SA 4.0. It is prohibited to use this material for commercial use otherwise you are OESF member or OESF education consortium member.
This document introduces Cypress, an end-to-end testing framework for web applications. It discusses why Cypress is useful for testing, how to get started by installing Cypress and writing test scripts, and provides tips for selecting elements and handling dynamic content. Key aspects covered include planning test cases, writing tests for common pages like login and article creation, and using the Cypress testing library to write robust tests.
Rishikesh has over 15 years of experience in IT and holds several certifications. He currently runs his own training consultancy in Pune, India where he conducts corporate trainings on various testing tools, including Selenium WebDriver. He has expertise in test automation, mobile testing, performance testing, and other areas.
Code reviews improve code quality and transparency by providing a discussion platform to foster continuous self-improvement. They reduce bug fixing and new feature implementation times by catching issues early. GitFlow workflow with merge requests enables code reviews. Developers start a feature branch, push commits to the central repository, and create a merge request for review. Reviewers test the code locally, check for bugs, quality, and style. They discuss improvements in the merge request before accepting it to merge into the main branch.
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...Ortus Solutions, Corp
The document provides an overview of unit testing, including:
- Unit testing validates that each software unit performs as designed and improves development and code quality.
- Guidelines for unit tests include making them fast, isolated, independent, robust, maintainable, purposeful, and automated.
- Test-driven development (TDD) uses the "red-green-refactor" process to write tests before code. Behavior-driven development (BDD) focuses on user requirements over implementation.
- The TestBox framework supports BDD-style testing in ColdFusion with constructs like describe, given, when, then. MockBox enables mocking dependencies.
This document provides an overview of a teacher's manual for a Lean training program. It outlines the structure and contents of the program, which is divided into 7 chapters covering Lean concepts and principles. Each chapter includes theory, exercises, games, videos and virtual environments to explain topics. Activities are coded based on chapter and type for easy reference. The estimated time to complete all program contents is 20 hours.
Online Audio Player - STQA_Mini_Project2.pdfrohanmandhare4
Online Audio Player is a website that provides users with two media
options. Online Media Player consists of both audio player and video player
options. The media player has a user-friendly interface so the user can easily
navigate between the tabs and experience better quality music and video.
Audio Player had many music options like classical, pop, rap, remix, and
more. All songs in the audio player have relative themes that enhance the
overall music experience. Another major part of online media players is video
players. Video Player consists of various types of video songs with high-quality
video experience. There is scope to upload the video songs in the video player so
that you can use them in the future. Anyone can easily get familiar with the user-friendly interface of the media player.
Technology-Driven Development: Using Automation and Development Techniques to...Rakuten Group, Inc.
This is the report presented at Agile2014 on "Experience Report" track.
「Agile2014」の「Experience Report」トラックで発表したスライドです。
Agile2014
http://agile2014.agilealliance.org/
Track information
http://agile2014.sched.org/event/356d50c44035cafe4c27c33da03c2b80#
Automation and development techniques such as Continuous Integration/Continuous Delivery, TDD (Test-Driven Development) and BDD (Behavior-Driven Development) are useful for not only efficiency but also learning and collaboration.
I explained these practices as "Technology-Driven Development".
CI/CD・TDD・BDD といった自動化技術・技術プラクティスは、業務効率化だけではなく、メンバーの成長およびコラボレーションの促進にも効果があります。
これらのプラクティスを "Technology-Driven Development" と命名・整理した資料になります。
Discover the latest insights on Data Driven Maintenance with our comprehensive webinar presentation. Learn about traditional maintenance challenges, the right approach to utilizing data, and the benefits of adopting a Data Driven Maintenance strategy. Explore real-world examples, industry best practices, and innovative solutions like FMECA and the D3M model. This presentation, led by expert Jules Oudmans, is essential for asset owners looking to optimize their maintenance processes and leverage digital technologies for improved efficiency and performance. Download now to stay ahead in the evolving maintenance landscape.
Lightning Web Components- Ep 1 - Decorators, Life Cycle Hooks and CompositionsNishant Singh Panwar
This document provides an overview of topics covered in Day 2 of a 5-day Lightning Web Components learning series, including decorators like @track and @api, component lifecycle hooks, and using getter/setter properties. Decorators are discussed for managing reactive data, exposing public properties and methods. The component lifecycle is explained, covering the constructor, connectedCallback, renderedCallback, and disconnectedCallback methods. Upcoming sessions on events, data, and additional topics are also promoted.
Static member functions can be accessed without creating an object of the class. They are used to access static data members, which are shared by all objects of a class rather than each object having its own copy. The examples show declaring a static data member n and static member function show() that prints n. show() is called through the class name without an object. Each object creation in the constructor increments n, and show() prints the updated count.
This document summarizes the key features of the TubeBuddy YouTube optimization tool. It provides productivity tools to speed up workflow, bulk processing tools to efficiently manage multiple videos, YouTube video SEO analysis and optimization features, tools to promote YouTube video channels, and data and keyword research features. TubeBuddy helps YouTube creators optimize their content, grow their channels and audiences, and more effectively manage their channels.
Java Multithreading Using Executors FrameworkArun Mehra
This document provides an overview of using executors to handle multithreading in Java. It discusses key classes and interfaces in the executors framework like Executor, ExecutorService, and Executors. Common thread pools like fixed thread pool and cached thread pool are mentioned. The document also summarizes techniques for naming threads, returning values from threads, creating daemon threads, checking thread status, terminating threads, and handling uncaught exceptions using both the thread and executor APIs. Finally, it covers scheduling tasks using both the timer/timerTask classes and executor service.
Technology-Driven Development: Using Automation and Development Techniques to...Hiroyuki Ito
This is the report presented at Agile2014 on "Experience Report" track.
「Agile2014」の「Experience Report」トラックで発表したスライドです。
Agile2014
http://agile2014.agilealliance.org/
Track information
http://agile2014.sched.org/event/356d50c44035cafe4c27c33da03c2b80#
Automation and development techniques such as Continuous Integration/Continuous Delivery, TDD (Test-Driven Development) and BDD (Behavior-Driven Development) are useful for not only efficiency but also learning and collaboration.
I explained these practices as "Technology-Driven Development".
CI/CD・TDD・BDD といった自動化技術・技術プラクティスは、業務効率化だけではなく、メンバーの成長およびコラボレーションの促進にも効果があります。
これらのプラクティスを "Technology-Driven Development" と命名・整理した資料になります。
This document provides an overview of managed beans in IBM Domino applications. It discusses key concepts such as what managed beans are, how they are configured and used, and when they make sense to use over traditional server-side JavaScript. It then outlines steps to create a basic managed bean, including creating the Java class, adding properties and getters/setters, configuring in faces-config.xml, and using the bean in an XPage. The document also covers debugging managed beans and presents an example application where managed beans would be well suited to address complexity and persistence needs.
Ready, Set, Record: Being Present and Engaging Students Online Using YouTubeJason Rhode
During this session at the 7th Annual International Symposium on Emerging Technologies for Online Learning, learn about one instructor's use of YouTube's free and easy-to-use features for recording, editing, captioning, and embedding video into his online course. An overview of the steps for recording, editing, captioning, video in YouTube will be provided as well as examples shared for various approaches for seamlessly incorporating video into any online course. While the session featured the integrated "video anywhere" YouTube features in Blackboard, the principles provided will be applicable to an online course in any learning management system. A summary of feedback survey results from students regarding their experiences with video in the course were shared as well as lessons learned by the instructor for those wishing to follow the same suggested steps for incorporating video in their own course. Accompanying presentation abstract is at http://sloanconsortium.org/conference/2014/et4online/ready-set-record-being-present-and-engaging-students-online-using-youtube and links at http://jasonrhode.com/et4online14
This document is a slide presentation about Robotium, an open source test framework for Android. The presentation discusses setting up Robotium, the limitations of standard Android testing, how Robotium addresses those limitations, and tips for using Robotium. The presentation was given by Jim White of Intertech on March 21, 2013 to provide an overview of Robotium and how it can be used to write automated tests for Android applications.
The document discusses learning objectives and functions of the Tegrity and EnsembleVideo video platforms. The objectives are to differentiate between the platforms, understand their best educational uses, and be able to use basic functions. Tegrity allows recording of class sessions including voice, screen, and video, while EnsembleVideo is for uploading and distributing existing videos. Basic Tegrity functions include recording and hosting videos, while EnsembleVideo allows uploading and publishing videos.
This document provides an overview of test automation using Selenium. It discusses reasons to automate testing such as supporting regression testing and finding defects missed by manual testing. It also discusses when not to automate, such as when an application's behavior is unstable. The document then covers the Selenium framework, its components like Selenium IDE and WebDriver, and languages it supports like Java. It also discusses concepts in object-oriented programming relevant to test automation like classes, objects, inheritance and more.
Android Application WebAPI Development TrainingOESF Education
OESF Authorized Training Course official textbook
Course: Android Application WebAPI Development Training
FULL VERSION
Language: English
Contributed by
Created by: Leading Edge Co.,Ltd.
Translated by: ISB Vietnam Co.,Ltd.
[Attention!]
This textbook is licensed under the Creative Commons License BY-NC-SA 4.0. It is prohibited to use this material for commercial use otherwise you are OESF member or OESF education consortium member.
This document introduces Cypress, an end-to-end testing framework for web applications. It discusses why Cypress is useful for testing, how to get started by installing Cypress and writing test scripts, and provides tips for selecting elements and handling dynamic content. Key aspects covered include planning test cases, writing tests for common pages like login and article creation, and using the Cypress testing library to write robust tests.
Rishikesh has over 15 years of experience in IT and holds several certifications. He currently runs his own training consultancy in Pune, India where he conducts corporate trainings on various testing tools, including Selenium WebDriver. He has expertise in test automation, mobile testing, performance testing, and other areas.
Code reviews improve code quality and transparency by providing a discussion platform to foster continuous self-improvement. They reduce bug fixing and new feature implementation times by catching issues early. GitFlow workflow with merge requests enables code reviews. Developers start a feature branch, push commits to the central repository, and create a merge request for review. Reviewers test the code locally, check for bugs, quality, and style. They discuss improvements in the merge request before accepting it to merge into the main branch.
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...Ortus Solutions, Corp
The document provides an overview of unit testing, including:
- Unit testing validates that each software unit performs as designed and improves development and code quality.
- Guidelines for unit tests include making them fast, isolated, independent, robust, maintainable, purposeful, and automated.
- Test-driven development (TDD) uses the "red-green-refactor" process to write tests before code. Behavior-driven development (BDD) focuses on user requirements over implementation.
- The TestBox framework supports BDD-style testing in ColdFusion with constructs like describe, given, when, then. MockBox enables mocking dependencies.
This document provides an overview of a teacher's manual for a Lean training program. It outlines the structure and contents of the program, which is divided into 7 chapters covering Lean concepts and principles. Each chapter includes theory, exercises, games, videos and virtual environments to explain topics. Activities are coded based on chapter and type for easy reference. The estimated time to complete all program contents is 20 hours.
Online Audio Player - STQA_Mini_Project2.pdfrohanmandhare4
Online Audio Player is a website that provides users with two media
options. Online Media Player consists of both audio player and video player
options. The media player has a user-friendly interface so the user can easily
navigate between the tabs and experience better quality music and video.
Audio Player had many music options like classical, pop, rap, remix, and
more. All songs in the audio player have relative themes that enhance the
overall music experience. Another major part of online media players is video
players. Video Player consists of various types of video songs with high-quality
video experience. There is scope to upload the video songs in the video player so
that you can use them in the future. Anyone can easily get familiar with the user-friendly interface of the media player.
Technology-Driven Development: Using Automation and Development Techniques to...Rakuten Group, Inc.
This is the report presented at Agile2014 on "Experience Report" track.
「Agile2014」の「Experience Report」トラックで発表したスライドです。
Agile2014
http://agile2014.agilealliance.org/
Track information
http://agile2014.sched.org/event/356d50c44035cafe4c27c33da03c2b80#
Automation and development techniques such as Continuous Integration/Continuous Delivery, TDD (Test-Driven Development) and BDD (Behavior-Driven Development) are useful for not only efficiency but also learning and collaboration.
I explained these practices as "Technology-Driven Development".
CI/CD・TDD・BDD といった自動化技術・技術プラクティスは、業務効率化だけではなく、メンバーの成長およびコラボレーションの促進にも効果があります。
これらのプラクティスを "Technology-Driven Development" と命名・整理した資料になります。
Discover the latest insights on Data Driven Maintenance with our comprehensive webinar presentation. Learn about traditional maintenance challenges, the right approach to utilizing data, and the benefits of adopting a Data Driven Maintenance strategy. Explore real-world examples, industry best practices, and innovative solutions like FMECA and the D3M model. This presentation, led by expert Jules Oudmans, is essential for asset owners looking to optimize their maintenance processes and leverage digital technologies for improved efficiency and performance. Download now to stay ahead in the evolving maintenance landscape.
Comparative analysis between traditional aquaponics and reconstructed aquapon...bijceesjournal
The aquaponic system of planting is a method that does not require soil usage. It is a method that only needs water, fish, lava rocks (a substitute for soil), and plants. Aquaponic systems are sustainable and environmentally friendly. Its use not only helps to plant in small spaces but also helps reduce artificial chemical use and minimizes excess water use, as aquaponics consumes 90% less water than soil-based gardening. The study applied a descriptive and experimental design to assess and compare conventional and reconstructed aquaponic methods for reproducing tomatoes. The researchers created an observation checklist to determine the significant factors of the study. The study aims to determine the significant difference between traditional aquaponics and reconstructed aquaponics systems propagating tomatoes in terms of height, weight, girth, and number of fruits. The reconstructed aquaponics system’s higher growth yield results in a much more nourished crop than the traditional aquaponics system. It is superior in its number of fruits, height, weight, and girth measurement. Moreover, the reconstructed aquaponics system is proven to eliminate all the hindrances present in the traditional aquaponics system, which are overcrowding of fish, algae growth, pest problems, contaminated water, and dead fish.
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Sinan KOZAK
Sinan from the Delivery Hero mobile infrastructure engineering team shares a deep dive into performance acceleration with Gradle build cache optimizations. Sinan shares their journey into solving complex build-cache problems that affect Gradle builds. By understanding the challenges and solutions found in our journey, we aim to demonstrate the possibilities for faster builds. The case study reveals how overlapping outputs and cache misconfigurations led to significant increases in build times, especially as the project scaled up with numerous modules using Paparazzi tests. The journey from diagnosing to defeating cache issues offers invaluable lessons on maintaining cache integrity without sacrificing functionality.
Embedded machine learning-based road conditions and driving behavior monitoringIJECEIAES
Car accident rates have increased in recent years, resulting in losses in human lives, properties, and other financial costs. An embedded machine learning-based system is developed to address this critical issue. The system can monitor road conditions, detect driving patterns, and identify aggressive driving behaviors. The system is based on neural networks trained on a comprehensive dataset of driving events, driving styles, and road conditions. The system effectively detects potential risks and helps mitigate the frequency and impact of accidents. The primary goal is to ensure the safety of drivers and vehicles. Collecting data involved gathering information on three key road events: normal street and normal drive, speed bumps, circular yellow speed bumps, and three aggressive driving actions: sudden start, sudden stop, and sudden entry. The gathered data is processed and analyzed using a machine learning system designed for limited power and memory devices. The developed system resulted in 91.9% accuracy, 93.6% precision, and 92% recall. The achieved inference time on an Arduino Nano 33 BLE Sense with a 32-bit CPU running at 64 MHz is 34 ms and requires 2.6 kB peak RAM and 139.9 kB program flash memory, making it suitable for resource-constrained embedded systems.
Null Bangalore | Pentesters Approach to AWS IAMDivyanshu
#Abstract:
- Learn more about the real-world methods for auditing AWS IAM (Identity and Access Management) as a pentester. So let us proceed with a brief discussion of IAM as well as some typical misconfigurations and their potential exploits in order to reinforce the understanding of IAM security best practices.
- Gain actionable insights into AWS IAM policies and roles, using hands on approach.
#Prerequisites:
- Basic understanding of AWS services and architecture
- Familiarity with cloud security concepts
- Experience using the AWS Management Console or AWS CLI.
- For hands on lab create account on [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
# Scenario Covered:
- Basics of IAM in AWS
- Implementing IAM Policies with Least Privilege to Manage S3 Bucket
- Objective: Create an S3 bucket with least privilege IAM policy and validate access.
- Steps:
- Create S3 bucket.
- Attach least privilege policy to IAM user.
- Validate access.
- Exploiting IAM PassRole Misconfiguration
-Allows a user to pass a specific IAM role to an AWS service (ec2), typically used for service access delegation. Then exploit PassRole Misconfiguration granting unauthorized access to sensitive resources.
- Objective: Demonstrate how a PassRole misconfiguration can grant unauthorized access.
- Steps:
- Allow user to pass IAM role to EC2.
- Exploit misconfiguration for unauthorized access.
- Access sensitive resources.
- Exploiting IAM AssumeRole Misconfiguration with Overly Permissive Role
- An overly permissive IAM role configuration can lead to privilege escalation by creating a role with administrative privileges and allow a user to assume this role.
- Objective: Show how overly permissive IAM roles can lead to privilege escalation.
- Steps:
- Create role with administrative privileges.
- Allow user to assume the role.
- Perform administrative actions.
- Differentiation between PassRole vs AssumeRole
Try at [killercoda.com](https://killercoda.com/cloudsecurity-scenario/)
1. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Object Oriented Programming
OOP Concept + OOP Programming
By Zarif Bahaduri
2. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Chapter 1
Introduction to OOP
3. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Programming Languages
• Programming languages allow programmers to code
software.
• The three major families of languages are:
• Machine languages
• Assembly languages
• High-Level languages
1
4. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Machine Language
• Comprised of 1s and 0s
• The native language of a computer
• Difficult to program – one misplaced 1 or 0 will fail the program
to run.
• Example of code:
1110100010101 111010101110
10111010110100 10100011110111
1
5. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Assembly Languages
• Assembly languages are a step towards easier programming.
• Assembly languages are comprised of a set of elemental
commands which are tied to a specific processor.
• Assembly language code needs to be translated to machine
language before the computer processes it.
• Example:
ADD 1001010, 1011010
1
6. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
High-Level Languages
• High-level languages represent a giant leap towards easier
programming.
• The syntax of HL languages is similar to English.
• Historically, we divide HL languages into two groups:
• Procedural languages
• Object-Oriented languages (OOP)
1
7. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Procedural Languages
• Early high-level languages are typically called procedural
languages.
• Procedural languages are characterized by sequential sets of linear
commands. The focus of such languages is on structure.
• Examples include C, COBOL, Fortran, LISP, Perl, HTML,
VBScript
1
8. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Object-Oriented Languages
• Most object-oriented languages are high-level languages.
• The focus of OOP languages is not on structure, but on
modeling data.
• Programmers code using “blueprints” of data models called
classes.
• Examples of OOP languages include C++, Visual Basic.NET
and Java.
1
9. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
What is OOP ?
• A way to look at a problem to be solved using a software based solution.
• A problem domain is characterized as a set of objects
• Object have specific attributes and behavior
• Objects are manipulated with a collection of function (method, operation,
services)
• Objects communicates with each other by passing massages
• Objects are divided into classes and subclasses
1
10. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Advantage of OOP
• There are two advantage of Object Oriented Programming.
• Advantage at Management Level
• Software is easy to maintain because the structure is inherently decoupled.
• Ease to change
• Less frustration (disappointed) for costumer and software engineers
• Advantage at Technical Level
• Objects are reusable and leads to faster software development and high quality
programs
• Easier to adapt and scale
1
11. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Chapter 2
Object and Class
12. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Classes
• Class: A class is a definition of objects. In other words, a class is a blueprint
for an object, template, or prototype that defines and describes the static
attributes and dynamic behaviors common to all objects of the same kind.
• instance: An instance is a realization of a particular item of a class. All the
instances of a class have similar properties, as described in the class
definition. For example, you can define a class called "Student" and create
three instances of the class "Student" for “ahmad", “ali" and “walid"
2
13. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
A Class is a 3-Compartment Box
• A class can be visualized as a three-compartment box,
• Classname (or identifier): identifies the class.
• Data Members or Variables (or attributes, states, fields): contains the static
attributes of the class.
• Member Functions (or methods, behaviors, operations): contains
the dynamic operations of the class.
2
14. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Class Examples
2
15. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Class Definition
• In C++, we use the keyword class to define a class. There are two sections in
the class declaration: private and public, which will be explained later. For
example.
Note: public, private and protected
are access modifiers, we will discuss
it later.
class Circle { // classname
private:
double radius; // Data members (variables)
string color;
public:
double getRadius(); // Member functions
double getArea();
}
2
16. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Creating Instances(object) of a Class
To create an instance of a class:
• Declare an instance identifier (name) of a particular class.
• Invoke a constructor to construct the instance (for example allocate storage for the
instance and initialize the variables).
• For examples, suppose that we have a class called Circle, we can create instances of
Circle as follows:
// Construct 3 instances of the class Circle: c1, c2, and c3
Circle c1(1.2, "red"); // radius, color
Circle c2(3.4); // radius, default color
Circle c3; // default radius and color
2
17. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Dot (.) Operator
• To reference a member of a object (data member or function), you must:
1. First identify the instance you are interested in, and then
2. Use the dot operator (.) to reference the member, in the form of
instanceName.memberName.
• For example, suppose that we have a class called Circle, with two data members
(radius and color) and two functions (getRadius() and getArea()). We have created
three instances of the class Circle, namely, c1, c2 and c3. To invoke the function
getArea(), you must first identity the instance of interest, says c2, then use the dot
operator, in the form of c2.getArea(), to invoke the getArea() function of instance
c2.
2
18. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
For example
// Declare and construct instances c1 and c2 of the class Circle
Circle c1(1.2, "blue");
Circle c2(3.4, "green");
// Invoke member function via dot operator
cout << c1.getArea() << endl;
cout << c2.getArea() << endl;
// Reference data members via dot operator
c1.radius = 5.5;
c2.radius = 6.6;
2
19. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Data member (Variable) & Member Functions
• A data member (variable) has a name (or identifier) and a type; and holds a
value of that particular type.
• A member function
1. Receives parameters from the caller,
2. Performs the operations defined in the function body, and
3. Returns a piece of result (or void) to the caller.
2
20. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
OOP Practical Example 2
21. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Practice on classes
Lab Workshop
Practical Practice
2
23. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Constructors
• A constructor is a special function that has the function name same as the
classname.
// Constructor has the same name as the class
Circle(double r = 1.0, string c = "red") {
radius = r;
color = c;
}
3
Constructor object Creating and passing values
Circle c1(1.2, "blue");
Circle c2(3.4); // default color
Circle c3; // default radius and color
// Take note that there is no empty bracket ()
24. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Constructors
A constructor function is different from an ordinary function in the following
aspects:
• The name of the constructor is the same as the classname.
• Constructor has no return type.
• Constructors takes Arguments.
• Constructor are not inherited.
3
25. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Constructors
• There are two Types of Constructors
• Default Constructor
• Parameterized Constructors
Both Constructors will describe through examples
3
26. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Default Constructor
class MyData{
private:
string ename;
int salary;
public:
//Other methods
void getdata(int s, string n){
salary=s;
ename=n;
cout<<s<<endl<<n;
}};
MyData(){
string n="ali";
int s=500;
salary=s;
ename=n;
cout<<s<<endl<<n;
}
3
27. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Parameterize Constructor
class MyData{
private:
string ename;
int salary;
public:
//Other methods
Int show(){
Int total=salary+com;
Return total;
}
};
MyData(int x=90, int y=0){
salary=x;
com=y;
}
3
28. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Constructor Overloading and Copy
Constructor
Copy
constructor
Constructor
Overloading
29. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Destructor
• Destructors are usually used to de-allocate memory and do other cleanup for a
class object and its class members when the object is destroyed. A destructor is
called for a class object when that object passes out of scope or is explicitly deleted.
• Destructors are parameter less functions.
• Name of the Destructor should be exactly same as the class. With prefix of ‘~’.
• Destructor does not have any return type.
• The Destructor of class is automatically called when object goes out of scope.
3
30. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Access Control Modifiers/Access pacifiers
Data hiding is one of the important features of Object Oriented Programming
which allows preventing the functions of a program to access directly the
internal representation of a class type. The access restriction to the class
members is specified by the labeled public, private, and protected sections
within the class body. The keywords public, private, and protected are called
access specifies.
A class can have multiple public, protected, or private labeled sections. The
default access for members and classes is private.
3
31. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Example
Class Test{
Private:
// data members
Public:
// data members
Protected:
// data members
};
3
32. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
The Public members
A public member is
accessible from anywhere
outside the class but
within a program. You can
set and get the value of
public variables without
any member function as
shown in the example:
Class Test{
Public: //access pacifier
int a;
Public: //access pacifier
Void show(){
Cout<<a;
}
};
Main(){
// code
}
3
33. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
The Private members
• A private member
variable or function
cannot be accessed, or
even viewed from
outside the class. Only
the class and friend
functions(not Member
functions, outside,) can
access private members.
• By default all the
members of a class
would be private.
Class Test{
private: //access pacifier
int salary;
Public: //access pacifier
int tax;
Void setsalary(int x);
};
Test::setsalary(int x){
Salary=x;
Cout<<salary;
}
Main(){
// code
}
3
34. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
The Protected members
• A protected member
variable or function is
very similar to a
private member but it
provided one
additional benefit that
they can be accessed in
child classes which are
called derived classes.
The derived classes
will cover later in
details.
class Test {
protected:
int tax=10;
};
class Test2 : Test{
public:
int salary=50;
int calc(){
int total=salary-tax;
return total;
}
};
Main(){
// code
}
3
35. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Access modifiers in Inheritance*
37. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
4
These are OOP main building blocks
1.Classes
2.Inheritance
3.Polymorphism
4.Encapsulation
5.Abstraction
38. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Inheritance
• Inheritance is one of the key feature of
object-oriented programming including
C++ which allows user to create a new
class(derived class) from a existing
class(base class). The derived class inherits
all feature from a base class and it can have
additional features of its own.
39. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Concept of Inheritance
Suppose, you want to calculate either area and perimeter of
a rectangle by taking data(length and breadth) from user.
You can create two different objects( Area, Perimeter) and
asks user to enter length and breadth in each object and
calculate corresponding data. But, the better approach
would be to create a additional object Rectangle to store
value of length and breadth from user and derive
objects Area and Perimeter from Rectangle base class. It is
because, the two objects Area, Perimeter are related to
object Rectangle and you don't need to ask user the input
data from these two derived objects as this feature is
included in base class.
40. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Access modifiers in Inheritance
41. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Modes of Inheritance
• Public mode: If we derive a sub class from a public base
class. Then the public member of the base class will become
public in the derived class and protected members of the
base class will become protected in derived class.
• Protected mode: If we derive a sub class from a Protected
base class. Then both public member and protected
members of the base class will become protected in derived
class.
• Private mode: If we derive a sub class from a Private base
class. Then both public member and protected members of
the base class will become Private in derived class.
42. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Inheritance
In C++ we have
• Single Inheritance
• Multiple Inheritance
• Multilevel Inheritance
• Hierarchical Inheritance
• Hybrid (Virtual) Inheritance
To understand it practically watch video on
YouTube, channel name : Zarif Bahaduri
43. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Inheritance
In C++ we have
• Single Inheritance
• Multiple Inheritance
• Multilevel Inheritance
• Hierarchical Inheritance
• Hybrid (Virtual) Inheritance
To understand it practically watch video on
YouTube, channel name : Zarif Bahaduri
44. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Inheritance
In C++ we have
• Single Inheritance
• Multiple Inheritance
• Multilevel Inheritance
• Hierarchical Inheritance
• Hybrid (Virtual) Inheritance
To understand it practically watch video on
YouTube, channel name : Zarif Bahaduri
45. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Inheritance
In C++ we have
• Single Inheritance
• Multiple Inheritance
• Multilevel Inheritance
• Hierarchical Inheritance
• Hybrid (Virtual) Inheritance
To understand it practically watch video on
YouTube, channel name : Zarif Bahaduri
46. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Inheritance
In C++ we have
• Single Inheritance
• Multiple Inheritance
• Multilevel Inheritance
• Hierarchical Inheritance
• Hybrid (Virtual) Inheritance
To understand it practically watch video on
YouTube, channel name : Zarif Bahaduri
47. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Function Overloading
&Function Overriding
• Function Overloading : Whenever same method name is exiting multiple times in
the same class with different number of parameter or different order of parameters or
different types of parameters is known as Function overloading.
• Function Overriding: If base class and derived class have member functions with
same name and arguments. If you create an object of derived class and write code to
access that member function then, the member function in derived class is only
invoked.
the member function of derived class overrides the member function of base class.
This feature in C++ programming is known as function overriding.
48. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Function Overloading
&Function Overriding
Function
Overloading
Function
Overriding
49. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Polymorphism
Function Overloading, Overriding and Virtual
Functions
• The process of representing one Form in multiple forms is
known as Polymorphism. Here one form represent original
form or original method always resides in base class and
multiple forms represents overridden method which resides in
derived classes.
• Polymorphism is derived from 2 Greek words: poly and
morphs. The word "poly" means many and morphs means
forms. So polymorphism means many forms.
• Suppose if you are in class room that time you behave like a
student, when you are in market at that time you behave like a
customer, when you at your home at that time you behave like a
son or daughter, Here one person have different-different
behaviors.
• In shopping behave like a customer
• In bus behave like a passenger
• In school behave like a student
• In home behave like a son
50. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Polymorphism
• Compile time polymorphism-: The overloaded member
function are selected for invoking by matching arguments
both type and number. this information is known to the
compile at the compile time.
• compiler is able to select the appropriate function for a
particular call at the compile time itself. This is called early
binding or static binding or static linking. Also known
as compile time polymorphism
• Function Overloading & Operator Overloading are
the best examples of compile time Polymorphism
51. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Polymorphism
• We have already discussed Function overloading . Go
back and check the video.
• Lets take a look on operator overloading.
• In C++, it's possible to change the way operator works
(for user-defined types)
52. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Operator Overloading
• We have already discussed Function overloading .
Go back and check the video.
• Lets take a look on operator overloading.
• C++ programming allows programmer to redefine
the meaning of an operator (when they operate on class objects) is known as operator overloading.
• The meaning of an operator is always same for variable of basic types like: int, float, double etc. For
example: To add two integers, + operator is used. However, for user-defined types (like: objects), you
can redefine the way operator works.
• For example: If there are two objects of a class that contains string as its data members. You can
redefine the meaning of + operator and use it to concatenate those strings.
53. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Operator Overloading
Lets program it practically, I will use Structures, and
classes in order to understand Operator overloading
completely.
54. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Operator Overloading
Lets program it practically, I will use Structures, and
classes in order to understand Operator overloading
completely.
box1
box2
x=3
y=2.5
y=3
x=4
box3 = box1+box2
y=5.5
x=7
Area =7.5
Area =12
Area =38.5
55. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Polymorphism
• Run time Polymorphism -: It is known what object are
under consideration the appropriate version of the
function is invoked since the function is linked with a
particular class much later after the compilation, this
process is termed as late binding. It is also known as
dynamic binding because this section of the appropriate
function is done dynamically at run time.
• Dynamic binding is a powerful feathers of C++
programming language. This requires to object.
• Function Overriding is the best example of it,
• Lets go for virtual function.
56. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Types of Polymorphism
Before using virtual function you must have information about pointer to a class.
• A virtual function is a member function which is declared
within base class and is re-defined (Overridden) by derived class.
When you refer to a derived class object using a pointer or a
reference to the base class, you can call a virtual function for
that object and execute the derived class’s version of the
function.
• Virtual functions ensure that the correct function is called for an
object, regardless of the type of reference (or pointer) used for
function call.
• They are mainly used to achieve Runtime polymorphism
• Functions are declared with a virtual keyword in base class.
• The resolving of function call is done at Run-time.
57. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Pointer to a class
• We have already discussed pointer to Variable,
Arrays and Structures.
• A pointer to a C++ class is done exactly. To access
members of a pointer to a class you use the member
access operator -> operator. And you must initialize
the pointer before using it.
• Understand the concept of pointer to a class:
58. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
This-keyword
“this” keyword is used when
• If Local variable have same name as data member.
• When a reference to a local object is returned, the returned reference can be used to chain
function calls on a single object
• delete this
• It kills the object, we recommend you not to use “delete this” in your program.
59. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Encapsulation
• Encapsulation is an Object Oriented Programming
concept that binds together the data and functions and
keeps both safe from external attack and misuse. Data
encapsulation led to the important OOP concept of data
hiding.
Advantage of Encapsulation
• The main advantage of using of encapsulation is to secure
the data from other methods, when we make a data private
then these data only use within the class, but these data not
accessible outside the class.
• 1) Make all the data members private.
2) Create public setter and getter functions for each data
member in such a way that the set function set the value
of data member and get function get the value of data
member.
60. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Encapsulation
• Real time example
• In real live we have a Capsule in which all the
medicine is encapsulate so the medicine is safe from
the external attack.
• In C++ we can consider the encapsulation
mechanism as a Capsule in which our Methods and
variable are safe from other classes or other methods
61. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Data Abstraction
• Data Abstraction is a concept which shouldn't be
confused with Abstract classes, it is separated.
• Data Abstraction is an OOP concept that focuses only
on relevant data of an object. It hides the background
details and emphasizes the essential data points for
reducing the complexity and increase efficiency.
Abstraction method mainly focuses on the idea instead
of actual functioning.
• Abstraction hides the irrelevant details found in the code.
62. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Encapsulation Vs Data
Abstraction
Abstraction
Encapsulation
63. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Encapsulation Vs Data
Abstraction
• Abstraction hides the irrelevant
details found in the code.
• Encapsulated Code is quite flexible
and easy to change with new
requirements.
• In abstraction, problems are solved
at the design or interface level.
• In encapsulation, problems are
solved at the implementation level.
64. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Passing Argument
• There are three ways of passing argument.
1. By passing values
2. By passing reference
3. By passing address, pointer
• 1:- Passing by values: By default, C++ copies
the actual value of an argument into the formal
parameter of the function. In this case, changes
made to the parameter inside the function have
no effect on the argument. call by value to pass
arguments. In general, this means that code
within a function cannot alter the arguments
used to call the function.
a=9 b=10
z=9
x=9 y=10
65. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Passing Argument
• There are three ways of passing argument.
1. By passing values
2. By passing reference
3. By passing address, pointer
• 2:- Passing by Reference: copies the
reference of an argument into the formal
parameter. Inside the function, the
reference is used to access the actual
argument used in the call, this means that
changes made to the parameter affect the
passed argument.
a=9 b=10
z=9
x y
66. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Passing Argument
• There are three ways of passing argument.
1. By passing values
2. By passing reference
3. By passing address, pointer
• 3:- Passing by address/pointer: copies the
address of an argument into the formal
parameter. Inside the function, the address
is used to access the actual argument used
in the call, this means that change made to
the parameter effect the passed argument.
a=9 b=10
z=9
#001 #010
*x
#001
*y
#010
67. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Virtual Function & Pure
Virtual function
• Virtual functions power polymorphism concept, while a pure
virtual functions lead us to the Abstract classes.
• A virtual function is a member function in the base class that
you redefine in a derived class. It is declared using the virtual
keyword.
• you cannot set a non-virtual function=0;
• virtual keyword does not work on class variables
68. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Abstract classes
• Are those classes having pure-virtual function
• We can not instantiate or can not make object/instance of
these classes same as when the constructor of a class is
private or protected.
• The derived class of Abstract class must implement the
pure-virtual function otherwise object of derived class is an
error.
• An Abstract class can have a pure-virtual function plus
other non-virtual functions and data members.
69. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Interfaces
• Interface is an Abstract class with NO member variable, it
contain on pure virtual functions.
• Interfaces are only a concept.
• All the pure-functions of an interfaces must be
implemented in derived classes.
70. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Virtual classes
• Virtual base classes, used in virtual inheritance, is a way of
preventing multiple "instances" of a given class appearing
in an inheritance hierarchy when using multiple
inheritance.
• An instance of textOffice will be made up of truck,
which includes vehicle, and car which also includes
vehicle. So you have two "instances" (for want of a better
expression) of vehicle. When you have this scenario, you
have the possibility of ambiguity.
• When you specify virtual when inheriting your classes,
you're telling the compiler that you only want a single
instance.
71. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Virtual classes
• Virtual base classes, used in virtual inheritance, is a way of
preventing multiple "instances" of a given class appearing
in an inheritance hierarchy when using multiple
inheritance.
• An instance of textOffice will be made up of truck,
which includes vehicle, and car which also includes
vehicle. So you have two "instances" (for want of a better
expression) of vehicle. When you have this scenario, you
have the possibility of ambiguity.
• When you specify virtual when inheriting your classes,
you're telling the compiler that you only want a single
instance.
72. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Static–keyword
• Static is a keyword gives special characteristics to an
element. Static elements are allocated storage only once in
a program lifetime in static storage area. And they have a
scope till the program lifetime. Static Keyword can be used
with.
• Static variable in functions
• Static Variable in class
• Static Class Objects
• Static function in class
1. Static variable in function: are initialized only once, and
then they hold there value even through function calls,
These static variables are stored on static storage area ,
not in stack.
• NOTE: java doesn’t allow static locale variable in a function
73. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Static–keyword
2. Static variable in class: As the variables declared as static
are initialized only once and as they are allocated space in
separate static storage so, the static variables in a class are
shared by the objects. There can not be multiple copies
of same static variables for different objects. Also because
of this reason static variables can not be initialized using
constructors. it must be initialized explicitly, always outside
the class. If not initialized, it will give error.
74. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Static–keyword
3. Static Class Object: Just like variables, objects
also when declared as static have a scope till the
lifetime of program. the destructor is invoked
after the end of main. This happened because the
scope of static object is through out the life time
of program.
75. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Static–keyword
• 4. Static function in class: Like static member or
variable of a class static member functions also does
not depend on object of class. We are allowed to
invoke a static member function using the object and
the ‘.’ operator but it is recommended to invoke the
static members using the class name and the scope
resolution operator.
Static member functions are allowed to access
only the static data members or other static
member functions, they can not access the non-
static data members or member functions of the
class. It doesn't have any "this" keyword which is the
reason it cannot access ordinary members.
76. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Static–keyword
• 4. Static function in class: Like static member or
variable of a class static member functions also
does not depend on object of class. We are allowed
to invoke a static member function using the object
and the ‘.’ operator but it is recommended to
invoke the static members using the class name
and the scope resolution operator.
Static member functions are allowed to access
only the static data members or other static
member functions, they can not access the non-
static data members or member functions of the
class. It doesn't have any "this" keyword which is
the reason it cannot access ordinary members.
77. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Friend Function
• Calling a normal function causes overhead(jumping from one point to
another and back to its previous point / stacking arguments). If a
function is inline, the compiler places a copy of the code of that
function at each point where the function is called at compile time.
NORMAL FUNCTION
{
//…
//…
myfun();
//…
//…
}
{
//…
//…
//…
//..
}
myfun()
main ()
INLINE FUNTION
{
//…
myfun();
}
{
//…
//…
}
main ()
NO
Control transfer
78. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Friend Function
• Calling a normal function causes overhead(jumping from one point to
another and back to its previous point / stacking arguments). If a
function is inline, the compiler places a copy of the code of that
function at each point where the function is called at compile time.
NORMAL FUNCTION
{
//…
//…
myfun();
//…
//…
}
{
//…
//…
//…
//..
}
myfun()
main ()
INLINE FUNTION
{
//…
myfun();
}
{
//…
//…
}
main ()
NO
Control transfer
79. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Friend Function
A friend function of a class is defined
outside that class, but it has the right to
access all private and protected members of
the class. Even though the prototypes for
friend functions appear in the class
definition, friends are not member
functions.
To declare a function as a friend of a class,
precede the function prototype in the class
definition with keyword friend as follows:
Friend Function Definition
80. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Operator
Operator is a special symbol that tells the compiler to perform specific
mathematical or logical Operation.
Here we discuss only the
unary operator and binary
operators in details .
81. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Operator
Lets do the practical program for each in Computer Lab
82. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Bit Wise Operator
A bitwise operation operates on one or more bit patterns or binary numerals
at the level of their individual bits. It is a fast, primitive action directly
supported by the processor, and is used to manipulate values for comparisons
and calculations.
83. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Bitwise Operators
1. | bitwise OR
2. ~ bitwise NOT
3. & bitwise AND
4. ^ bitwise XOR
5. << bitwise left shift
6. >> bitwise right shift
NOTE:
To understand completely bitwise
operators you, must have a clear
DLD logical gats concept.
84. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
|, & bitwise
0011 = 3
0101 = 5
0111 = 7
| OR
0011 = 3
0101 = 5
0001 = 1
& AND
If you Remember, logical |OR evaluates to true (1). if either
the left or the right or both operands are true (1). Bitwise OR
evaluates to 1 if either bit (or both) is 1. So, 3 | 5 evaluates
like this:
Bitwise AND works similarly. Logical &AND evaluates to true
if both the left and right operand evaluate to true. Bitwise
AND evaluates to true if both bits in the column are 1)
85. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
~ , ^ bitwise
0011 = 3
1100=12
~ NOT
0011 = 3
0101 = 5
0110 = 6
^ XOR
The last operator is the bitwise XOR (^), also known as exclusive or. When evaluating two operands, XOR evaluates to true (1) if one and only one of it's operands is true (1). If neither or both are true, it evalu
Bitwise XOR (^) also known as exclusive or. When
evaluating two operands, XOR evaluates to true (1) if one and
only one of it's operands is true (1). If neither or both are
true, it evaluates to 0.
The bitwise NOT operator (~) is perhaps the easiest to
understand of all the bitwise operators. It simply flips
each bit from a 0 to a 1,
87. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Important Topics
Friend Function
Virtual function
Inline function
Static Keyword
Pointer and functions
Pointer and strings
Discussed already click here
Discussed already click here
Discussed already click here
88. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
This Pointer
• Every object in C++ has access to its own address through an important
pointer called this pointer. The this pointer is an implicit parameter to all
member functions. Therefore, inside a member function, this may be used to
refer to the invoking object.
• Friend functions do not have a this pointer, because friends are not
members of a class. Only member functions have a this pointer.
90. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
User Defined Data Types
To declare a new data type in C++ we will discuss only:
• Typedef
• Union
• Structures
3
91. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Typedef
• Typedefs allow you to create an alias for a data type, and use the aliased
name instead of the actual type name. To declare a typedef, simply use
the typedef keyword, followed by the type to alias, followed by the alias
name:
typedef double distance; //typedef alias is declare
distance a; = double a;
Example
Typedef int numbers;
Main(){
numbers a;
a=90;
cout<<a;
}
3
92. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Union
• A union is a user-defined data type
• To begin the declaration of a union with the union keyword, and enclose the
member list in curly braces:
union tag
{
member-list
}declaretor;
Union Data{
int numbers;
Double dec;
String text;
} ver1;
Main(){
Ver1.numbers=900;
cout<<ver1.numbers;
}
Example
3
93. Watch videos on YouTube.
Channel Name: Zarif Bahaduri
Structures
• A structure is one or a group of variables considered as a (custom) data type. To
create a structure, use the struct keyword followed by a name for the object, at least
followed by a semi-colon. It can be created as follow
struct data{
//body of structure
Int num;
Doubl dic;
String text;
};
struct data ver1;
Ver1.text=“your text";
cout<<ver1.text;
3