Structured Languages- Need and Characteristics of OOP, Data Types and Modifiers, Arrays, Classes, Objects, Pointers, References, Difference between Pointers and References, Inheritance, Constructors, Destructors, and Polymorphism.
Every value in Java has a data type. Java supports two kinds of data types: primitive data types and reference data types. Primitive data types represent atomic, indivisible values. Java has eight Numeric data types: byte, short, int,
An operator is a symbol that is used to perform some type of computation on its operands. Java contains a rich set of
operators. Operators are categorized as unary, binary, or ternary based on the number of operands they take. They are categorized as arithmetic, relational, logical, etc. based on the operation they perform on their operands.
long, float, double, char, and boolean. Literals of primitive data types are constants. Reference data types represent
references of objects in memory. Java is a statically typed programming language. That is, it checks the data types of all values at compile time.
Data types, Variables, Expressions & Arithmetic Operators in javaJaved Rashid
What are the Primitive data types in Java?
What is a variable?
Rules for naming a variable.
How to declare a variable.
Assignment Statement
Assignment & Initialization of a variable
Strings in Expressions
What is a Expression
How expressions are evaluated
Arithmetic Operators
Order of Precedence & Associativity
FellowBuddy.com is a platform which has been setup with a simple vision, keeping in mind the dynamic requirements of students.
Our Vision & Mission - Simplifying Students Life
Our Belief - “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom-446240585585480
Every value in Java has a data type. Java supports two kinds of data types: primitive data types and reference data types. Primitive data types represent atomic, indivisible values. Java has eight Numeric data types: byte, short, int,
An operator is a symbol that is used to perform some type of computation on its operands. Java contains a rich set of
operators. Operators are categorized as unary, binary, or ternary based on the number of operands they take. They are categorized as arithmetic, relational, logical, etc. based on the operation they perform on their operands.
long, float, double, char, and boolean. Literals of primitive data types are constants. Reference data types represent
references of objects in memory. Java is a statically typed programming language. That is, it checks the data types of all values at compile time.
Data types, Variables, Expressions & Arithmetic Operators in javaJaved Rashid
What are the Primitive data types in Java?
What is a variable?
Rules for naming a variable.
How to declare a variable.
Assignment Statement
Assignment & Initialization of a variable
Strings in Expressions
What is a Expression
How expressions are evaluated
Arithmetic Operators
Order of Precedence & Associativity
FellowBuddy.com is a platform which has been setup with a simple vision, keeping in mind the dynamic requirements of students.
Our Vision & Mission - Simplifying Students Life
Our Belief - “The great breakthrough in your life comes when you realize it, that you can learn anything you need to learn; to accomplish any goal that you have set for yourself. This means there are no limits on what you can be, have or do.”
Like Us - https://www.facebook.com/FellowBuddycom-446240585585480
SlideShare now has a player specifically designed for infographics. Upload your infographics now and see them take off! Need advice on creating infographics? This presentation includes tips for producing stand-out infographics. Read more about the new SlideShare infographics player here: http://wp.me/p24NNG-2ay
This infographic was designed by Column Five: http://columnfivemedia.com/
No need to wonder how the best on SlideShare do it. The Masters of SlideShare provides storytelling, design, customization and promotion tips from 13 experts of the form. Learn what it takes to master this type of content marketing yourself.
10 Ways to Win at SlideShare SEO & Presentation OptimizationOneupweb
Thank you, SlideShare, for teaching us that PowerPoint presentations don't have to be a total bore. But in order to tap SlideShare's 60 million global users, you must optimize. Here are 10 quick tips to make your next presentation highly engaging, shareable and well worth the effort.
For more content marketing tips: http://www.oneupweb.com/blog/
Are you new to SlideShare? Are you looking to fine tune your channel plan? Are you using SlideShare but are looking for ways to enhance what you're doing? How can you use SlideShare for content marketing tactics such as lead generation, calls-to-action to other pieces of your content, or thought leadership? Read more from the CMI team in their latest SlideShare presentation on SlideShare.
Each month, join us as we highlight and discuss hot topics ranging from the future of higher education to wearable technology, best productivity hacks and secrets to hiring top talent. Upload your SlideShares, and share your expertise with the world!
Not sure what to share on SlideShare?
SlideShares that inform, inspire and educate attract the most views. Beyond that, ideas for what you can upload are limitless. We’ve selected a few popular examples to get your creative juices flowing.
How to Make Awesome SlideShares: Tips & TricksSlideShare
Turbocharge your online presence with SlideShare. We provide the best tips and tricks for succeeding on SlideShare. Get ideas for what to upload, tips for designing your deck and more.
C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...Rowank2
In-depth C programming language interview questions are covered in this post, covering questions on pointers, memory management, data structures, and other advanced subjects. The questions are designed to evaluate the candidate's knowledge of the language's intricacies and sophisticated elements. Candidates can better their language skills and be ready for forthcoming interviews by going through these questions.
Structures-Declaring and Initializing, Nested structure, Array of Structure, Passing Structures to functions, Unions, typedef, enum, Bit fields.
Pointers: Declarations, Pointer arithmetic, Pointers and functions, call by value, Call by reference, Pointers and Arrays, Arrays of Pointers, Pointers and Structures. Meaning of static and dynamic memory allocation, Memory allocation functions.
Files: File modes, File functions, and File operations, Text and Binary files, Command Line arguments Preprocessor directives. Macros: Definition, types of Macros, Creating and implementing user defined header files
Guide to Networking in Canada for Newcomers
TOPICS to Discuss
Definition for Networking
Importance of Networking
Types of Networking
General Networking
Face-to-Face Networking
Online Networking
How to Start Networking
Tips for Networking
Canada for Newcomers - Economy and Employment.
Topic:
Government and types of Government in Canada.
Education system in Canada.
Economy and Employment Opportunities in Ontario
Economy and Employment Opportunities in British Columbia
Economy and Employment Opportunities in Quebec.
Winters in Toronto - Self help guide for New Immigrants (PR's, Open Work Perm...Mufaddal Nullwala
Winters in Toronto - Self help guide for New Immigrants (PR's, Open Work Permit , Close Work Permit, Students)
Topic:
Winter Clothing
Importance of Winter Clothing
Winter Foods
Healthy and Tasty Foods during the Winter
Winter Activities
For Adults
For Children
ORGANISATIONAL MANAGEMENT - BOOK REVIEW - COMMUNICATING WITH EMPLOYEES IMPROV...Mufaddal Nullwala
CONTENTS:
About the Book
OBJECTIVES FOR COMMUNICATING WITH EMPLOYEES
WAYS OF COMMUNICATION IN ORGANISATION
HOW TO EVALUATE AN ORGANIZATION’S COMMUNICATION EFFECTIVENESS
PLANNING SUCCESSFUL ORGANIZATIONAL COMMUNICATION
YOUR COMMUNICATION TOOL KIT
CONCLUSION
FINANCIAL ANALYSIS - BOOK REVIEW - FAULT LINES - HOW HIDDEN FRACTURES STILL T...Mufaddal Nullwala
Contents:
Background
Challenges faced by U.S
Let Them Eat Credit
Exporting to Grow
Flighty foreign financing
Weak Safety Net
From Bubble to bubble
When money is the measure of all worth
Betting the bank
Reforming Finance
Broad Principles Of Reform
Eliminating “Too Systemic to Fail”
Resilience
Improving access to opportunity in America.
Multilateral institutions & their influence
Obtaining global influence
China and The World
Persuading China
What lies Ahead for INDIA
1. What is Energy
2. Type of Energy
3. What is Energy Audit
4. Definition of Energy Audit
5. The Need for Energy Audit
6. Why Energy Audit
7. Preliminary Energy Audit
8. Targeted Energy Audit
9. Energy Pyramid
10. Energy Costs in Indian Scenario
1. History of Product Differentiation
2. Product Differentiation Strategy
3. Cost and Benefits of Product Differentiation
4. Types of Product Differentiation
5. Bases of Differentiation
6. Differentiating Factors
7. Differentiation & Porter’s 5 Force Model
8. Advantages of Product Differentiation
9. Competitive Advantages
10. Value for Product Differentiation
11. Differentiation and Segmentation
12. Case Study – Micromax
13. Case Study – Pizza Hut
14. Conclusion
Introduction to Blockchain
History of Blockchain
How Blockchain works
Blockchain platforms
Blockchain consensus/validation algorithms
Proof-of-work algorithm (PoW)
Practical byzantine fault tolerance algorithm (PBFT)
Proof-of-stake algorithm (PoS)
Delegated proof-of-stake algorithm (DPoS)
Who uses blockchain
Advantages and disadvantages of blockchain
What is Robotic Process Automation (RPA)
Evolution of RPA
Benefits of RPA
Application of RPA
6 Step RPA
Robotic Spectrum
Differences between RPA and regular automation
Top RPA vendors
What to look for in RPA software
C-level decision-making around RPA
Where the robotic process automation market is heading
1) Introduction
2) Fast Moving Inventory Model
3) ECommerce Comparision
4) Business Model
5) Complaint Management System (CMS)
6) Inventory Management System
7) Business Strategy
8) Customer Relationship Management.
Business Ethics - Metaphysics of Morals by Immanuel KantMufaddal Nullwala
Business Ethics - Book Review - Metaphysics of Morals by Immanuel Kant.
1) Biography of Immanuel Kant
2) Kant’s Concept on Morality
3) Chapter 1 – Goodwill
4) Chapter 1 – The Notion of Duty and Maxim
5) Chapter 2 - Transition from popular Moral Philosophy to the Metaphysic of Morals
6) Chapter 3 - Transition from the Metaphysics of Morals to the critique of pure practical reason
Indian Economy & Startups generating Business & JobsMufaddal Nullwala
Indian Economy & Startups- Generating Business & Jobs:
Indian economy is world's seventh largest economy by nominal GDP.
Amongst all the sectors contributing to the economy, service sector has its largest share and most of it comes from the IT. The expansion of IT sector has been led by the innumerable start-ups in the economy.
Marketing Management - Brand Building (eg.of Big Bazaar, WestSide, Globus)Mufaddal Nullwala
Contents :
1) Big Bazaar
Introduction
7P Analysis of Big Bazaar
Range of Products
SWOT Analysis
Future Strategies
Advertising
2) WestSide
Introduction
Three Cs for WestSide
Market Research
Retail Layout
Promotion and Advertising
3) Globus
Introduction
Mission Vision and Goals
7P Analysis of Globus
BUSINESS PLAN
For
R-TRIBHA
(UTILIZATION OF WASTE)
Coverage :
1) Idea Generation
2) Product’s Detail
3) Equipment's
4) Process Technology
5) Space Required
6) Investment
7) Market & Pricing
8) Organization Structure & People Requirement
9) Designing Role Expectation of the Top Management
10) Performance Projection for next 5 years
11) Profit & Loss A/C for next 5 years
12) Return on Investment
13) Payback Period
1) How the ILO come into being ?
Who founded the International Labour Organization (ILO) ?
What was the purpose of the International Labour Organisation ?
India, a Founding Member of the ILO, has been a permanent member of the ILO Governing Body since 1922. The first ILO Office in India started in 1928.
2) Mission and impact of the ILO
ILO is devoted to promoting social justice and internationally recognized human and labour rights
Only tripartite U.N. agency, the ILO brings together governments, employers and workers representatives of 187 member States
Today, the ILO's Decent Work agenda helps advance the economic and working conditions that give all workers, employers and governments a stake in lasting peace, prosperity and progress
3) Overview of ilo in india
ILO's current portfolio in India centers around the following:
Child labour
Preventing family indebtedness
Employment
Skills
Integrated approaches for local socio-economic development and livelihoods promotion
Green jobs
Value-addition into national programmes
Micro and small enterprises
Social security
HIV/AIDS
Migration
Industrial relations
Dealing with the effects of globalization
Productivity and Competitiveness, etc.
4) OVERVIEW OF LABOUR MARKET IN INDIA (2015-16)
GDP growth rate reached 7.6% in 2015-16, up from 5.6 per cent in 2012-13
Vast majority of workers are in informal jobs
Growth in agriculture and related activities was estimated at just 1.2 %, while growth in the industrial and services sectors reached 7.4 % and 8.9 % respectively, in 2015-16
Employment growth picked up pace from 2009-10 to 2011-12, but gender gaps remain
Youth unemployment is high in urban areas
Organizational Change
Forces for Change
Case Study – General Motors
Planned vs Unplanned Change
Case Study – Coca Cola
Resistance to Change
Dealing with Resistance
Case Study – Uber
Approaches to Change Management
Case Study – Merger of ING Vysa and Kotak Mahindra Bank
1) Organizational Change
=>Word of Wisdom
=>Forces to Change
2) Planned Changes
=>Difference between Planned and Unplanned Change
=>Change Agents
=>Challenges
=>Porter’s 5 Forces
3) Resistance to Changes
=> Why is Change resisted
=>Sources
=>Overcoming Resistance to Change
4) Approaches to Manage Organizational Changes
=>Lewin’s 3 Step Model
=>Force Field Analysis
=>Kotter’s 8 Step Model
Origins and domain of Knowledge Management
Technological development
Characteristics of knowledge
Knowledge Management as a Management Tool
Critical elements of Knowledge Management strategy
Tactic Knowledge Management
Knowledge Management and Process Performance
Outsourcing Concept
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
GridMate - End to end testing is a critical piece to ensure quality and avoid...ThomasParaiso2
End to end testing is a critical piece to ensure quality and avoid regressions. In this session, we share our journey building an E2E testing pipeline for GridMate components (LWC and Aura) using Cypress, JSForce, FakerJS…
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfMalak Abu Hammad
Discover how MongoDB Atlas and vector search technology can revolutionize your application's search capabilities. This comprehensive presentation covers:
* What is Vector Search?
* Importance and benefits of vector search
* Practical use cases across various industries
* Step-by-step implementation guide
* Live demos with code snippets
* Enhancing LLM capabilities with vector search
* Best practices and optimization strategies
Perfect for developers, AI enthusiasts, and tech leaders. Learn how to leverage MongoDB Atlas to deliver highly relevant, context-aware search results, transforming your data retrieval process. Stay ahead in tech innovation and maximize the potential of your applications.
#MongoDB #VectorSearch #AI #SemanticSearch #TechInnovation #DataScience #LLM #MachineLearning #SearchTechnology
In his public lecture, Christian Timmerer provides insights into the fascinating history of video streaming, starting from its humble beginnings before YouTube to the groundbreaking technologies that now dominate platforms like Netflix and ORF ON. Timmerer also presents provocative contributions of his own that have significantly influenced the industry. He concludes by looking at future challenges and invites the audience to join in a discussion.
Building RAG with self-deployed Milvus vector database and Snowpark Container...Zilliz
This talk will give hands-on advice on building RAG applications with an open-source Milvus database deployed as a docker container. We will also introduce the integration of Milvus with Snowpark Container Services.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfPaige Cruz
Monitoring and observability aren’t traditionally found in software curriculums and many of us cobble this knowledge together from whatever vendor or ecosystem we were first introduced to and whatever is a part of your current company’s observability stack.
While the dev and ops silo continues to crumble….many organizations still relegate monitoring & observability as the purview of ops, infra and SRE teams. This is a mistake - achieving a highly observable system requires collaboration up and down the stack.
I, a former op, would like to extend an invitation to all application developers to join the observability party will share these foundational concepts to build on:
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
A tale of scale & speed: How the US Navy is enabling software delivery from l...
Structured Languages
1. Name Roll No
Mufaddal Nullwala 15-I-131
MIM Second Year (2015 – 18)
STRUCTURED LANGUAGE
JBIMS MIM Sem-IV
Structured Language
2. Object Oriented Programming, Need and
Characteristics
Basic Data Types and Modifiers
Arrays, Classes and Objects
Pointers, Reference, Difference between
Pointers and Reference
Inheritance, Constructors, Destructors and
Polymorphism.
3. Why we need OOPs in Programming language?
Procedure
Oriented
Programmin
g
Object
Oriented
Programmi
ng
4. Characteristics of Object Oriented Programming
Abstraction: Abstraction means showing essential features and hiding non-
essential features to the user.
For Eg: Yahoo Mail...
When you provide the user name and password and click on submit button..It will
show Compose, Inbox, Outbox, Sent mails...so and so when you click on
compose it will open...but user doesn't know what are the actions performed
internally....It just Opens....that is essential; User doesn't know internal actions
...that is non-essential things...
For Eg: TV Remote..
Remote is a interface between user and TV. Which has buttons like 0 to 10 ,on
/of etc but we don't know circuits inside remote. User does not need to know.
Just he is using essential thing that is remote.
5. Encapsulation: Encapsulation means which binds the data and code (or) writing
operations and methods in single unit (class).
For Example:
A car is having multiple parts like steering, wheels, engine etc. which binds together
to form a single object that is car. So, Here multiple parts of cars encapsulates itself
together to form a single object that is Car.
In real time we are using Encapsulation for security purpose...
Encapsulation = Abstraction + Data Hiding.
6. Polymorphism :
Polymorphism means ability to take more than one form that an operation
can exhibit different behavior at different instance depend upon the data
passed in the operation.
1) We behave differently in front of elders, and friends. A single person is
behaving differently at different time.
2) A software engineer can perform different task at different instance of time
depending on the task assigned to him .He can done coding , testing ,
analysis and designing depending on the task assign and the requirement.
7. While doing programming in any
programming language, we need to use
various variables to store various information.
Variables are nothing but reserved memory
locations to store values. This means that when
we create a variable, it reserves some space in
memory.
9. Integers are whole number such as 5,39,-1917,0
etc.
They have no fractional part
Integers can have positive as well as negative
value
An identifiers declared as int cannot have
fractional part
10. characters can store any member of the c++
implementation’s basic character set
An identifiers declared as char becomes
character variable
char set is often said to be a integer type
11. A number having a fractional part is a floating-
point number
the decimal point shows that it is a floating-
point number not an integer
for ex-31.0 is a floating-point number not a
integer but simply 31 is a integer
12. It is used for handling floating-point
numbers
It occupies twice as memory as float
It is used when float is too small or
insufficiently precise
13. The void data type specifies an empty set of
values .
It is used as the return type for functions that
do not return a value.
It is used when program or calculation does not
require any value but the syntax needs it.
14. Array
Consecutive group of memory locations
Same name and type (int, char, etc.)
To refer to an element
Specify array name and position number (index)
Format: arrayname[ position number ]
First element at position 0
N-element array c
c[ 0 ], c[ 1 ] … c[ n - 1 ]
Nth element as position N-1
15. Array elements like other variables
Assignment, printing for an integer array c
c[ 0 ] = 3;
cout << c[ 0 ];
Can perform operations inside subscript
c[ 5 – 2 ] same as c[3]
17. When declaring arrays, specify
Name
Type of array
Any data type
Number of elements
type arrayName[ arraySize ];
int c[ 10 ]; // array of 10 integers
float d[ 3284 ]; // array of 3284 floats
Declaring multiple arrays of same type
Use comma separated list, like regular variables
int b[ 100 ], x[ 27 ];
18. Initializing arrays
For loop
Set each element
Initializer list
Specify each element when array declared
int n[ 5 ] = { 1, 2, 3, 4, 5 };
If not enough initializers, rightmost elements 0
To set every element to same value
int n[ 5 ] = { 0 };
If array size omitted, initializers determine size
int n[] = { 1, 2, 3, 4, 5 };
5 initializers, therefore 5 element array
19. Classes are templates in real life it has variables,
arrays & functions
Example: Students Admission form consisting of
Full Name, Age, Birthdate, Standard, Class etc.
Bank Account Saving Form
Account Holders Name, Birthdate, Gender,
Residential Address, Office Address etc.
20. Example:
public class student{
String name
Int Age
Proteted Function getStudentInfo(){
Return (info)
}
}
It’s a Template
Stores data
Reusable
It can have subclass
21. • Objects are specific instance of classes, it
contains the information related to the
specific record it has.
• Reference ID
• Information related to the item
22. A pointer is a programming language object,
whose value refers to (or "points to") another
value stored elsewhere in the computer
memory using its memory address.
A pointer references a location in memory, and
obtaining the value stored at that location is
known as dereferencing the pointer.
23. A pointer variable is a variable whose value
is the address of a location in memory.
To declare a pointer variable, you must
specify the type of value that the pointer
will point to, for example,
int* ptr; // ptr will hold the
address of an int
char* q; // q will hold the address
of a char
24. int x;
x = 12;
int* ptr;
ptr = &x;
NOTE: Because ptr holds the address
of x,
we say that ptr “points to” x
2000
12
x
3000
2000
ptr
25. int x;
x = 12;
int* ptr;
ptr = &x;
cout<<*ptr;
NOTE: The value pointed to by ptr is
denoted by *ptr
2000
12
x
3000
2000
ptr
26. int x;
x = 12;
int* ptr;
ptr = &x;
*ptr = 5;
2000
12
x
3000
2000
ptr
5
// changes the value
at the address ptr
points to 5
27. A reference variable is an alias, that is, another
name for an already existing variable.
Once a reference is initialized with a variable,
either the variable name or the reference name
may be used to refer to the variable.
Application : References are primarily used as
function parameters
28. #include <iostream.h>
// Function prototypes
(required in C++)
void p_swap(int *, int *);
void r_swap(int&, int&);
int main (void){
int v = 5, x = 10;
cout << v << x << endl;
p_swap(&v,&x);
cout << v << x << endl;
r_swap(v,x);
cout << v << x << endl;
return 0;
}
void r_swap(int &a,
int &b)
{
int temp;
temp = a; (2)
a = b; (3)
b = temp;
}
void p_swap(int *a,
int *b)
{
int temp;
temp = *a; (2)
*a = *b; (3)
*b = temp;
}
29. 1. No explicit de-referencing is required
2. Guarantee that the reference will not be
NULL (though it may be invalid)
3. References cannot be rebound to
another instance
4. You don’t have to pass the address of a
variable
30. Provides a way to create a new class from an
existing class
The new class is a specialized version of the
existing class
31.
32. Base class (or parent) – inherited from
Derived class (or child) – inherits from the base
class
Notation:
class Student // base class
{
. . .
};
class UnderGrad : public student
{ // derived
class
. . .
};
33. 1) public – object of derived class can be treated
as object of base class (not vice-versa)
2) protected – more restrictive than public,
but allows derived classes to know details of
parents
3) private – prevents objects of derived class
from being treated as objects of base class.
34. Derived class inherits from base class
Public Inheritance (“is a”)
Public part of base class remains public
Protected part of base class remains protected
Protected Inheritance (“contains a”)
Public part of base class becomes protected
Protected part of base class remains protected
Private Inheritance (“contains a”)
Public part of base class becomes private
Protected part of base class becomes private
35. An object of a derived class 'is a(n)' object of the
base class
Example:
an UnderGrad is a Student
a Mammal is an Animal
A derived object has all of the characteristics of
the base class
36. An object of the derived class has:
• All members defined in child class
• All members declared in parent class
An object of the derived class can use:
• All public members defined in child class
• All public members defined in parent class
37. • A derived class can have more than one
base class
• Each base class can have its own access
specification in derived class's definition:
class cube : public square,
public rectSolid;
class
square
class
rectSolid
class
cube
38. Problem: what if base classes have member
variables/functions with the same name?
Solutions:
Derived class redefines the multiply-defined
function
Derived class invokes member function in a
particular base class using scope resolution
operator ::
Compiler errors occur if derived class uses
base class function without one of these
solutions
39. A class constructor is a special member function of
a class that is executed whenever we create new
objects of that class.
A constructor is a special member function whose
task is to initialize the objects of its class.
It is special because its name is same as the class
name.
The constructor is invoked whenever an object of
its associated class is created.
It is called constructor because it constructs the
values of data members of the class.
40. A constructor will have exact same name as the
class and it does not have any return type at all,
not even void.
Constructors can be very useful for setting
initial values for certain member variables.
Constructors can not be virtual.
41.
42.
43. Destructor is a special class function which
destroys the object as soon as the scope of
object ends. The destructor is called
automatically by the compiler when the object
goes out of scope.
The syntax for destructor is same as that for the
constructor, the class name is used for the
name of destructor, with a tilde ~ sign as prefix
to it.
44. Destructors are special member functions of the
class required to free the memory of the object
whenever it goes out of scope.
Destructors are parameter less functions.
Name of the Destructor should be exactly same
as that of name of the class. But preceded by ‘~’
(tilde).
Destructors does not have any return type. Not
even void.
45.
46.
47. Polymorphism is the capability of a method to do
different things based on the object .
In other words, polymorphism allows you define one
interface and have multiple implementations.
1. It is a feature that allows one interface to be
used for a general class of actions.
2. An operation may show different behavior in
different instances.
3. The behavior depends on the types of data used
in the operation.
4. It plays an important role in allowing objects
having different internal structures to share the
same external interface.
5. Polymorphism is extensively used in
implementing inheritance.
48. There are two types of
polymorphism in java :
1. Runtime polymorphism (Dynamic
polymorphism)
2. Compile time polymorphism (static
polymorphism).
49. Method overriding is a perfect example of Runtime
polymorphism. In this kind of polymorphism,
reference of class X can hold object of class X or an
object of any sub classes of class X. For e.g. if class Y
extends class X then both of the following statements
are valid:
50.
51. Method Overloading is a perfect example of
compile time polymorphism. In simple
terms we can say that a class can have
more than one methods with same name
but with different number of arguments or
different types of arguments or both.