The document discusses object-oriented programming concepts including objects, classes, message passing, abstraction, encapsulation, inheritance, polymorphism, and dynamic binding. It provides examples and definitions for each concept. It also discusses how to represent real-world entities like a person or place as objects with states (attributes and values) and behaviors (methods). Classes are defined as blueprints that specify common properties and functionality for objects. The relationships between classes and objects are demonstrated.
The document discusses key concepts in object-oriented programming including classes, objects, encapsulation, inheritance, polymorphism, and dynamic binding. It provides examples of classes and objects, explaining that classes define types of objects and act as blueprints. Objects are instances of classes that have state in the form of attributes and behavior via methods. The document also summarizes abstraction, encapsulation, inheritance, polymorphism, and message passing in object-oriented programming.
The document discusses object-oriented programming and how it relates to assembling a computer system from components. It states that object-oriented programming works similarly by making a program up of different self-contained objects that can communicate with each other in predefined ways, just like computer components fit together and communicate. It then provides a problem statement for building an order management system and outlines the contents to be covered related to basic C++ concepts.
This document provides an introduction to object-oriented programming concepts. It defines object-oriented programming as a way to conceptualize a program as interacting objects. Key concepts discussed include:
- Classes define templates for objects and their properties and behaviors.
- Objects are instantiated from classes and represent specific instances.
- Inheritance allows new classes to inherit properties from parent classes.
- Encapsulation groups related properties and methods together within objects.
- Polymorphism allows methods to perform different actions depending on an object's properties.
Unit 1 introduces the basics of object-oriented programming (OOP). OOP treats data as objects that contain both data fields (properties) and methods (behaviors). Classes are templates that are used to create objects. Some key principles of OOP include encapsulation, which binds an object's data and methods together, inheritance which allows classes to share structures and behaviors of other classes, and polymorphism which allows different classes to have similarly-named methods that work in different ways. OOP aims to make code reusable, modular, and adaptable to changing requirements compared to traditional procedural programming.
The document discusses object-oriented programming concepts like classes, objects, methods, encapsulation, abstraction, and inheritance. It provides examples of defining classes with attributes and methods, creating objects, and accessing object properties and methods. Constructors (__init__()) are discussed as special methods that initialize objects. Encapsulation, information hiding, and abstraction are presented as key concepts for modeling real-world objects in code with public and private interfaces.
Object-oriented programming aims to implement real-world entities as objects that contain both data and functions. Some key characteristics of OOP include classes that act as blueprints for objects, encapsulation that binds data to the functions that operate on it, inheritance that allows classes to inherit properties from other classes, and polymorphism which allows the same message to be displayed in different forms. Advantages of OOP include reusability, flexibility, ease of maintenance and security through features like encapsulation.
This document provides an overview of object-oriented programming (OOP) concepts including objects, classes, encapsulation, inheritance, polymorphism, and abstraction. It explains that OOP allows decomposition of programs into objects that contain both data and functions. Classes act as blueprints for objects and define their properties and behaviors.
The document discusses key concepts in object-oriented programming including classes, objects, encapsulation, inheritance, polymorphism, and dynamic binding. It provides examples of classes and objects, explaining that classes define types of objects and act as blueprints. Objects are instances of classes that have state in the form of attributes and behavior via methods. The document also summarizes abstraction, encapsulation, inheritance, polymorphism, and message passing in object-oriented programming.
The document discusses object-oriented programming and how it relates to assembling a computer system from components. It states that object-oriented programming works similarly by making a program up of different self-contained objects that can communicate with each other in predefined ways, just like computer components fit together and communicate. It then provides a problem statement for building an order management system and outlines the contents to be covered related to basic C++ concepts.
This document provides an introduction to object-oriented programming concepts. It defines object-oriented programming as a way to conceptualize a program as interacting objects. Key concepts discussed include:
- Classes define templates for objects and their properties and behaviors.
- Objects are instantiated from classes and represent specific instances.
- Inheritance allows new classes to inherit properties from parent classes.
- Encapsulation groups related properties and methods together within objects.
- Polymorphism allows methods to perform different actions depending on an object's properties.
Unit 1 introduces the basics of object-oriented programming (OOP). OOP treats data as objects that contain both data fields (properties) and methods (behaviors). Classes are templates that are used to create objects. Some key principles of OOP include encapsulation, which binds an object's data and methods together, inheritance which allows classes to share structures and behaviors of other classes, and polymorphism which allows different classes to have similarly-named methods that work in different ways. OOP aims to make code reusable, modular, and adaptable to changing requirements compared to traditional procedural programming.
The document discusses object-oriented programming concepts like classes, objects, methods, encapsulation, abstraction, and inheritance. It provides examples of defining classes with attributes and methods, creating objects, and accessing object properties and methods. Constructors (__init__()) are discussed as special methods that initialize objects. Encapsulation, information hiding, and abstraction are presented as key concepts for modeling real-world objects in code with public and private interfaces.
Object-oriented programming aims to implement real-world entities as objects that contain both data and functions. Some key characteristics of OOP include classes that act as blueprints for objects, encapsulation that binds data to the functions that operate on it, inheritance that allows classes to inherit properties from other classes, and polymorphism which allows the same message to be displayed in different forms. Advantages of OOP include reusability, flexibility, ease of maintenance and security through features like encapsulation.
This document provides an overview of object-oriented programming (OOP) concepts including objects, classes, encapsulation, inheritance, polymorphism, and abstraction. It explains that OOP allows decomposition of programs into objects that contain both data and functions. Classes act as blueprints for objects and define their properties and behaviors.
This document provides an introduction to object-oriented programming (OOP) concepts. It discusses procedural programming and its limitations. OOP aims to overcome these limitations through concepts like encapsulation, inheritance, polymorphism, and abstraction. Encapsulation binds data and functions together in classes. Inheritance allows deriving new classes from existing classes. Polymorphism allows the same action to be performed in different ways. Abstraction describes things at a conceptual level. Examples are provided to illustrate these core OOP concepts. The next lecture will cover implementing OOP in C# and building a game with Unity 3D.
Object oriented programming concepts such as abstraction, encapsulation, inheritance and polymorphism are supported in .NET languages like C# and Visual Basic. Encapsulation groups related properties and methods into a single object. Inheritance allows new classes to be created from an existing class. Polymorphism allows multiple classes to be used interchangeably even if they implement properties or methods differently.
Encapsulation promotes maintenance and code reusability by controlling access to data and code. It is implemented by defining public interfaces and keeping data and non-essential operations private. Object-oriented programming provides advantages like clear modular structure, easy maintenance and modification of existing code, and reusable code libraries. Key concepts of OOP include objects, classes, abstraction, encapsulation, inheritance, and polymorphism. Abstraction focuses on essential features while hiding background details, and encapsulation stores data and accessing functions together within a class.
This document discusses object-oriented concepts including identity, classification, inheritance, polymorphism, and abstraction. It defines these concepts and provides examples. Identity refers to each object having its own identity even if attribute values are identical. Classification groups objects of the same structure and behavior into classes. Inheritance allows classes to inherit attributes and behaviors from superclasses. Polymorphism allows the same operation to have different implementations for different classes. Abstraction focuses on essential aspects and ignores non-essential details. The document also discusses class, state, and interaction models for describing different views of a system.
This document provides information about a class on Object Oriented Programming (OOP) with C++ taught by Venkatadri.M, an Assistant Professor at the University of Petroleum and Energy Studies in Dehradun, India. The class covers the evolution of OOP, the history of C++, organizing data and functions in OOP, features of object oriented languages, and polymorphism. The instructor uses diagrams, animations and PowerPoint presentations to teach the concepts and address frequently asked questions from students.
Object-oriented programming concepts organize software using objects that contain data and code. An object stores its state in fields and exposes behavior through methods. Encapsulating data within objects and requiring interaction through methods is known as data encapsulation. Classes define types of objects and act as blueprints, allowing the creation of multiple objects with similar characteristics. Inheritance allows new classes to inherit properties from existing classes. Polymorphism allows objects to take on multiple forms, while dynamic binding determines appropriate code to execute based on an object's type at runtime. Objects communicate by sending and receiving messages containing method names and parameters. Packages organize related classes and interfaces into logical groups.
The document provides an introduction to Object Oriented Analysis and Design (OOAD). It discusses key OO concepts including objects, classes, inheritance, polymorphism, and the three main models used in OOAD - the class model, state model, and interaction model. It also provides examples to illustrate concepts like classification, inheritance, polymorphism, and the relationships between the different models. The document is serving as an introductory chapter to OOAD principles and terminology.
Object oriented programming (OOP) addresses limitations of procedural programming by dividing programs into objects that encapsulate both data and behaviors. OOP supports features like inheritance, polymorphism, and abstraction. Inheritance allows new classes to inherit attributes and behaviors from parent classes, polymorphism allows the same message to be interpreted differently depending on the object receiving it, and abstraction focuses on essential characteristics without implementation details. These features help make programs more modular, reusable, and maintainable.
Object oriented programming 6 oop with c++Vaibhav Khanna
This document discusses core concepts of object-oriented programming (OOP). It explains that OOP aims to represent real-world entities as objects that interact by sending messages. It then defines key OOP concepts - objects are run-time entities representing people or things, classes are user-defined types that define objects, encapsulation wraps data and functions into classes, inheritance allows classes to inherit properties from other classes, polymorphism allows the same operation to behave differently based on object type, dynamic binding determines behavior at run-time based on object type, and message passing allows objects to communicate by sending requests.
This document provides an overview of object-oriented programming and Java. It defines object-oriented programming as organizing programs around objects and their interfaces rather than functions. The key concepts of OOP discussed include classes, objects, encapsulation, inheritance, polymorphism, and abstraction. It also provides details on the history and characteristics of Java, the most popular language for OOP. The document is serving as course material for a programming paradigms class focusing on OOP using Java.
Object Oriented Programming is a programming paradigm that uses objects and their interactions to design applications and computer programs. The document discusses the limitations of procedural programming and how object oriented programming aims to address these. It introduces key concepts of OOP like classes, objects, encapsulation, inheritance and polymorphism. Classes act as a blueprint to create real objects with data and behaviors. The document provides examples of defining empty classes and creating multiple objects in Python.
C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX
Most C++ compilers don't care what extension you give your source code, but if you don't specify otherwise, many will use .cpp by default
Most frequently used and free available compiler is GNU C/C++ compiler, otherwise you can have compilers either from HP or Solaris if you have respective Operating Systems.
This document provides an introduction and overview of data structures and algorithms. It begins by outlining the topics that will be covered, including data structures, algorithms, abstract data types, and object-oriented programming. It then defines what a data structure is and provides examples. Different types of data structures are discussed, including linear structures like lists, queues, and stacks, as well as non-linear structures like trees, graphs, and hash tables. The document also defines what an algorithm is and discusses why algorithms are important. It provides examples of successful algorithms and discusses the need for correctness and efficiency in algorithms. The relationship between programs, data structures, and algorithms is also briefly explained.
C++ was created by Bjarne Stroustrup and combines elements of C and Simula67. It supports both low-level efficiency and high-level coding through object-oriented programming principles like encapsulation, polymorphism, and inheritance. C++ programs organize code around data and define types that specify which operations can be performed on that type of data.
Object-oriented analysis and design is an evolutionary development method built upon past proven concepts. The document discusses object-oriented systems development processes including use case driven analysis, the Object Modeling Technique (OMT), class diagrams, relationships between classes, and object-oriented modeling. It provides examples of class diagrams showing classes, attributes, operations, and relationships. It also explains the four views of OMT - the object model, dynamic model, functional model, and how OMT separates modeling.
This document discusses key concepts in object-oriented programming (OOP) including objects, classes, abstraction, encapsulation, inheritance, overloading, exception handling, and polymorphism. It provides examples for each concept, such as describing a mobile phone as an object with calling and messaging functions, and subclasses that extend the basic mobile class with brand-specific features. The document traces the history and development of OOP starting in the 1960s and highlights some of its benefits compared to procedural programming.
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
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
This document provides an overview of object-oriented programming concepts. It discusses procedural programming versus object-oriented programming. It then describes key characteristics of OOP like objects, classes, encapsulation, abstraction, inheritance, polymorphism, and message passing. Objects are runtime entities that have state and behavior. Classes provide blueprints for objects and define their properties and methods. Encapsulation hides implementation details, while abstraction exposes only necessary details. Inheritance allows classes to inherit properties from other classes. Polymorphism allows the same method name to perform different tasks. Message passing allows objects to communicate by sending and receiving messages.
This document provides an introduction to object-oriented programming (OOP) concepts. It discusses procedural programming and its limitations. OOP aims to overcome these limitations through concepts like encapsulation, inheritance, polymorphism, and abstraction. Encapsulation binds data and functions together in classes. Inheritance allows deriving new classes from existing classes. Polymorphism allows the same action to be performed in different ways. Abstraction describes things at a conceptual level. Examples are provided to illustrate these core OOP concepts. The next lecture will cover implementing OOP in C# and building a game with Unity 3D.
Object oriented programming concepts such as abstraction, encapsulation, inheritance and polymorphism are supported in .NET languages like C# and Visual Basic. Encapsulation groups related properties and methods into a single object. Inheritance allows new classes to be created from an existing class. Polymorphism allows multiple classes to be used interchangeably even if they implement properties or methods differently.
Encapsulation promotes maintenance and code reusability by controlling access to data and code. It is implemented by defining public interfaces and keeping data and non-essential operations private. Object-oriented programming provides advantages like clear modular structure, easy maintenance and modification of existing code, and reusable code libraries. Key concepts of OOP include objects, classes, abstraction, encapsulation, inheritance, and polymorphism. Abstraction focuses on essential features while hiding background details, and encapsulation stores data and accessing functions together within a class.
This document discusses object-oriented concepts including identity, classification, inheritance, polymorphism, and abstraction. It defines these concepts and provides examples. Identity refers to each object having its own identity even if attribute values are identical. Classification groups objects of the same structure and behavior into classes. Inheritance allows classes to inherit attributes and behaviors from superclasses. Polymorphism allows the same operation to have different implementations for different classes. Abstraction focuses on essential aspects and ignores non-essential details. The document also discusses class, state, and interaction models for describing different views of a system.
This document provides information about a class on Object Oriented Programming (OOP) with C++ taught by Venkatadri.M, an Assistant Professor at the University of Petroleum and Energy Studies in Dehradun, India. The class covers the evolution of OOP, the history of C++, organizing data and functions in OOP, features of object oriented languages, and polymorphism. The instructor uses diagrams, animations and PowerPoint presentations to teach the concepts and address frequently asked questions from students.
Object-oriented programming concepts organize software using objects that contain data and code. An object stores its state in fields and exposes behavior through methods. Encapsulating data within objects and requiring interaction through methods is known as data encapsulation. Classes define types of objects and act as blueprints, allowing the creation of multiple objects with similar characteristics. Inheritance allows new classes to inherit properties from existing classes. Polymorphism allows objects to take on multiple forms, while dynamic binding determines appropriate code to execute based on an object's type at runtime. Objects communicate by sending and receiving messages containing method names and parameters. Packages organize related classes and interfaces into logical groups.
The document provides an introduction to Object Oriented Analysis and Design (OOAD). It discusses key OO concepts including objects, classes, inheritance, polymorphism, and the three main models used in OOAD - the class model, state model, and interaction model. It also provides examples to illustrate concepts like classification, inheritance, polymorphism, and the relationships between the different models. The document is serving as an introductory chapter to OOAD principles and terminology.
Object oriented programming (OOP) addresses limitations of procedural programming by dividing programs into objects that encapsulate both data and behaviors. OOP supports features like inheritance, polymorphism, and abstraction. Inheritance allows new classes to inherit attributes and behaviors from parent classes, polymorphism allows the same message to be interpreted differently depending on the object receiving it, and abstraction focuses on essential characteristics without implementation details. These features help make programs more modular, reusable, and maintainable.
Object oriented programming 6 oop with c++Vaibhav Khanna
This document discusses core concepts of object-oriented programming (OOP). It explains that OOP aims to represent real-world entities as objects that interact by sending messages. It then defines key OOP concepts - objects are run-time entities representing people or things, classes are user-defined types that define objects, encapsulation wraps data and functions into classes, inheritance allows classes to inherit properties from other classes, polymorphism allows the same operation to behave differently based on object type, dynamic binding determines behavior at run-time based on object type, and message passing allows objects to communicate by sending requests.
This document provides an overview of object-oriented programming and Java. It defines object-oriented programming as organizing programs around objects and their interfaces rather than functions. The key concepts of OOP discussed include classes, objects, encapsulation, inheritance, polymorphism, and abstraction. It also provides details on the history and characteristics of Java, the most popular language for OOP. The document is serving as course material for a programming paradigms class focusing on OOP using Java.
Object Oriented Programming is a programming paradigm that uses objects and their interactions to design applications and computer programs. The document discusses the limitations of procedural programming and how object oriented programming aims to address these. It introduces key concepts of OOP like classes, objects, encapsulation, inheritance and polymorphism. Classes act as a blueprint to create real objects with data and behaviors. The document provides examples of defining empty classes and creating multiple objects in Python.
C++ is a middle-level programming language developed by Bjarne Stroustrup starting in 1979 at Bell Labs. C++ runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX
Most C++ compilers don't care what extension you give your source code, but if you don't specify otherwise, many will use .cpp by default
Most frequently used and free available compiler is GNU C/C++ compiler, otherwise you can have compilers either from HP or Solaris if you have respective Operating Systems.
This document provides an introduction and overview of data structures and algorithms. It begins by outlining the topics that will be covered, including data structures, algorithms, abstract data types, and object-oriented programming. It then defines what a data structure is and provides examples. Different types of data structures are discussed, including linear structures like lists, queues, and stacks, as well as non-linear structures like trees, graphs, and hash tables. The document also defines what an algorithm is and discusses why algorithms are important. It provides examples of successful algorithms and discusses the need for correctness and efficiency in algorithms. The relationship between programs, data structures, and algorithms is also briefly explained.
C++ was created by Bjarne Stroustrup and combines elements of C and Simula67. It supports both low-level efficiency and high-level coding through object-oriented programming principles like encapsulation, polymorphism, and inheritance. C++ programs organize code around data and define types that specify which operations can be performed on that type of data.
Object-oriented analysis and design is an evolutionary development method built upon past proven concepts. The document discusses object-oriented systems development processes including use case driven analysis, the Object Modeling Technique (OMT), class diagrams, relationships between classes, and object-oriented modeling. It provides examples of class diagrams showing classes, attributes, operations, and relationships. It also explains the four views of OMT - the object model, dynamic model, functional model, and how OMT separates modeling.
This document discusses key concepts in object-oriented programming (OOP) including objects, classes, abstraction, encapsulation, inheritance, overloading, exception handling, and polymorphism. It provides examples for each concept, such as describing a mobile phone as an object with calling and messaging functions, and subclasses that extend the basic mobile class with brand-specific features. The document traces the history and development of OOP starting in the 1960s and highlights some of its benefits compared to procedural programming.
FellowBuddy.com is an innovative platform that brings students together to share notes, exam papers, study guides, project reports and presentation for upcoming exams.
We connect Students who have an understanding of course material with Students who need help.
Benefits:-
# Students can catch up on notes they missed because of an absence.
# Underachievers can find peer developed notes that break down lecture and study material in a way that they can understand
# Students can earn better grades, save time and study effectively
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
This document provides an overview of object-oriented programming concepts. It discusses procedural programming versus object-oriented programming. It then describes key characteristics of OOP like objects, classes, encapsulation, abstraction, inheritance, polymorphism, and message passing. Objects are runtime entities that have state and behavior. Classes provide blueprints for objects and define their properties and methods. Encapsulation hides implementation details, while abstraction exposes only necessary details. Inheritance allows classes to inherit properties from other classes. Polymorphism allows the same method name to perform different tasks. Message passing allows objects to communicate by sending and receiving messages.
This document summarizes the key issues with the traditional waterfall software development model based on analyses from the mid-1990s. It discusses that while the theory behind waterfall is sound, in practice it often led to: 1) protracted integration and late design breakages due to unforeseen issues emerging late in the process, 2) late risk resolution focusing too much on early paper artifacts, 3) requirements-driven decomposition ignoring emerging needs, 4) adversarial stakeholder relationships focusing on documents not collaboration, and 5) over-focus on documents and reviews not iterative development. Overall, less than 20% of projects succeeded under this model.
The document discusses various sorting algorithms including insertion sort, quicksort, merge sort, and their time complexities. Insertion sort has worst-case time complexity of O(n^2) but works well for small lists. Quicksort and merge sort have average time complexity of O(nlogn). Merge sort uses additional storage space while quicksort may have worst-case time of O(n^2) if the pivot choice is poor.
This document provides an overview of databases and database management systems (DBMS). It discusses the history of databases, from early file-based systems to hierarchical, network, and relational models. Key topics covered include the definition of a database, components of a DBMS like SQL and data dictionaries, the roles involved in database administration, and advantages/limitations of DBMS. The document concludes with an assignment asking students to review the chapter, read an appendix, and submit a group list.
The document provides information about SQL and PL/SQL. It discusses SQL, which is a standard language for database manipulation. It allows users to create, update, retrieve, and delete data from databases. The document also describes SQL history, characteristics, advantages, datatypes, and commands including DDL, DML, DCL, and TCL. It then discusses MySQL, its features, datatypes, and how to install and connect to MySQL.
This document summarizes key concepts from Chapter 2 of the textbook "Database System Concepts" by Silberschatz, Korth and Sudarshan. It introduces the relational model, including the structure of relational databases, relational algebra operations, null values, and modification of databases. Key concepts covered include relations, tuples, relation schemas, keys, and the basic relational algebra operations of select, project, join, union, difference and rename. An example of a banking database with relations for branches, customers, accounts and loans is also provided.
The document discusses project planning and management. It covers topics like process planning, effort estimation, schedule and resource estimation, quality planning, and risk management. Effective project management is key to successfully executing projects on time and within budget. Project planning involves creating detailed schedules, estimating efforts, defining quality objectives, and identifying and mitigating risks. Estimation models like COCOMO are used to estimate effort based on parameters like project size. Milestones are determined based on effort distribution and manpower ramp-up over time.
The document discusses file input/output (I/O) in Java. It covers:
1) Java's I/O system of readers, writers, and streams for reading from and writing to files.
2) Exceptions in file I/O and how to handle errors using try/catch blocks.
3) Examples of reading text and binary data from files, writing data to files, and scanning files for specific data.
The document introduces information retrieval and describes how an inverted index works as the key data structure for modern IR systems. An inverted index stores for each term a list of all documents that contain the term. It allows efficient processing of Boolean queries by merging the postings lists of query terms. Query processing aims to optimize the order of processing terms based on their document frequencies to minimize the size of intermediate results.
This document introduces object-oriented programming (OOP) by explaining the differences between structured and OOP, defining key OOP terminology like objects, classes, methods, and attributes. It describes the four main design principles of OOP - encapsulation, abstraction, polymorphism, and inheritance. Encapsulation hides implementation details and abstraction focuses on important facts. Polymorphism allows the same word to have different meanings. Inheritance allows classes to inherit attributes and methods from superclasses to subclasses. Popular OOP languages include Java, C++, and Smalltalk.
The document discusses the Scanner class in Java, which is used to get user input from the keyboard. It describes several methods of the Scanner class like nextInt(), nextFloat(), and nextLine() that can be used to read integer, float, and string values from the user. An example program is given that uses the Scanner class to take integer, float, and string inputs from the user and display them.
Project evaluation is the process of measuring the success of a project through gathering data and using evaluation methods. It allows identifying performance improvements and keeping stakeholders updated. Project evaluation criteria consider factors like time, cost, scope, and quality. There are various project evaluation methods including pre-project, ongoing, and post-project evaluation. Project appraisal involves a detailed evaluation of a project's political, social, environmental, technical, financial, and economic feasibility to determine its viability. It helps decide whether to accept or reject a project.
This document discusses project evaluation techniques including strategic assessment, technical assessment, cost benefit analysis, cashflow forecasting, and risk evaluation. It provides details on each technique. Strategic assessment evaluates how well a project aligns with organizational goals and strategies. Technical assessment considers the functionality of a project. Cost benefit analysis compares projected costs and benefits in monetary terms. Cashflow forecasting estimates costs and benefits over time. Risk evaluation examines potential risks of a project. The document also discusses challenges in project monitoring and evaluation.
Wireless communication technologies have evolved from Guglielmo Marconi's early radio demonstrations in 1897. In the 1960s-1970s, Bell Laboratories developed the cellular concept, which enabled wireless communication networks to serve entire populations. This led to the development of cellular mobile systems using radio frequency technology. Cellular systems use a hexagonal cell structure and frequency reuse to improve spectrum efficiency and service capacity. They employ technologies such as handoff, dynamic channel assignment, and prioritization of handoffs to manage calls as users move between cells.
The document introduces software project management. It discusses that software projects are a type of project management that faces unique challenges due to the invisible nature and complexity of software. Successful project management requires setting clear and measurable objectives, thorough planning, and active monitoring and control to adapt to inevitable changes. Communication between stakeholders is essential throughout the project life cycle.
This document discusses conventional software project management. It outlines key attributes and players in a project, typical expenditures by phase for a conventional project using the waterfall model, and the need for project management. Project management is defined as managing and controlling project activities, while operation management focuses on running ongoing business operations. The differences between project and operation management are explained. Finally, the document outlines some activities covered under software project management.
This document discusses conventional software project management. It outlines key attributes and players in a project, typical expenditures by phase for a conventional project using the waterfall model, and the need for project management. Project management is defined as managing and controlling project activities, while operation management focuses on running ongoing business operations. The differences between project and operation management are explained. Finally, the document outlines some activities covered under software project management.
This document provides an introduction to information retrieval systems and their main components. It discusses how IR systems aim to find relevant documents from a large collection in response to a user's information need. The key processes involved are document indexing to represent contents, query formulation, retrieval of relevant documents, and system evaluation. Indexing involves selecting important keywords from documents and assigning them weights. Various retrieval models are described for comparing document and query representations, such as vector space and probabilistic models. The document also discusses challenges in document representation, query processing, and evaluating system effectiveness.
The document discusses various searching and sorting algorithms. It begins by describing sequential search on an unordered file, then covers the differences between searching ordered and unordered lists. It introduces binary search as a faster search method for ordered lists. The document explains how binary search works and analyzes its logarithmic time complexity. Finally, it briefly introduces common sorting algorithms like bubble sort and insertion sort to sort data before applying faster search methods.
Microbial characterisation and identification, and potability of River Kuywa ...Open Access Research Paper
Water contamination is one of the major causes of water borne diseases worldwide. In Kenya, approximately 43% of people lack access to potable water due to human contamination. River Kuywa water is currently experiencing contamination due to human activities. Its water is widely used for domestic, agricultural, industrial and recreational purposes. This study aimed at characterizing bacteria and fungi in river Kuywa water. Water samples were randomly collected from four sites of the river: site A (Matisi), site B (Ngwelo), site C (Nzoia water pump) and site D (Chalicha), during the dry season (January-March 2018) and wet season (April-July 2018) and were transported to Maseno University Microbiology and plant pathology laboratory for analysis. The characterization and identification of bacteria and fungi were carried out using standard microbiological techniques. Nine bacterial genera and three fungi were identified from Kuywa river water. Clostridium spp., Staphylococcus spp., Enterobacter spp., Streptococcus spp., E. coli, Klebsiella spp., Shigella spp., Proteus spp. and Salmonella spp. Fungi were Fusarium oxysporum, Aspergillus flavus complex and Penicillium species. Wet season recorded highest bacterial and fungal counts (6.61-7.66 and 3.83-6.75cfu/ml) respectively. The results indicated that the river Kuywa water is polluted and therefore unsafe for human consumption before treatment. It is therefore recommended that the communities to ensure that they boil water especially for drinking.
Improving the viability of probiotics by encapsulation methods for developmen...Open Access Research Paper
The popularity of functional foods among scientists and common people has been increasing day by day. Awareness and modernization make the consumer think better regarding food and nutrition. Now a day’s individual knows very well about the relation between food consumption and disease prevalence. Humans have a diversity of microbes in the gut that together form the gut microflora. Probiotics are the health-promoting live microbial cells improve host health through gut and brain connection and fighting against harmful bacteria. Bifidobacterium and Lactobacillus are the two bacterial genera which are considered to be probiotic. These good bacteria are facing challenges of viability. There are so many factors such as sensitivity to heat, pH, acidity, osmotic effect, mechanical shear, chemical components, freezing and storage time as well which affects the viability of probiotics in the dairy food matrix as well as in the gut. Multiple efforts have been done in the past and ongoing in present for these beneficial microbial population stability until their destination in the gut. One of a useful technique known as microencapsulation makes the probiotic effective in the diversified conditions and maintain these microbe’s community to the optimum level for achieving targeted benefits. Dairy products are found to be an ideal vehicle for probiotic incorporation. It has been seen that the encapsulated microbial cells show higher viability than the free cells in different processing and storage conditions as well as against bile salts in the gut. They make the food functional when incorporated, without affecting the product sensory characteristics.
Presented by The Global Peatlands Assessment: Mapping, Policy, and Action at GLF Peatlands 2024 - The Global Peatlands Assessment: Mapping, Policy, and Action
Evolving Lifecycles with High Resolution Site Characterization (HRSC) and 3-D...Joshua Orris
The incorporation of a 3DCSM and completion of HRSC provided a tool for enhanced, data-driven, decisions to support a change in remediation closure strategies. Currently, an approved pilot study has been obtained to shut-down the remediation systems (ISCO, P&T) and conduct a hydraulic study under non-pumping conditions. A separate micro-biological bench scale treatability study was competed that yielded positive results for an emerging innovative technology. As a result, a field pilot study has commenced with results expected in nine-twelve months. With the results of the hydraulic study, field pilot studies and an updated risk assessment leading site monitoring optimization cost lifecycle savings upwards of $15MM towards an alternatively evolved best available technology remediation closure strategy.
Kinetic studies on malachite green dye adsorption from aqueous solutions by A...Open Access Research Paper
Water polluted by dyestuffs compounds is a global threat to health and the environment; accordingly, we prepared a green novel sorbent chemical and Physical system from an algae, chitosan and chitosan nanoparticle and impregnated with algae with chitosan nanocomposite for the sorption of Malachite green dye from water. The algae with chitosan nanocomposite by a simple method and used as a recyclable and effective adsorbent for the removal of malachite green dye from aqueous solutions. Algae, chitosan, chitosan nanoparticle and algae with chitosan nanocomposite were characterized using different physicochemical methods. The functional groups and chemical compounds found in algae, chitosan, chitosan algae, chitosan nanoparticle, and chitosan nanoparticle with algae were identified using FTIR, SEM, and TGADTA/DTG techniques. The optimal adsorption conditions, different dosages, pH and Temperature the amount of algae with chitosan nanocomposite were determined. At optimized conditions and the batch equilibrium studies more than 99% of the dye was removed. The adsorption process data matched well kinetics showed that the reaction order for dye varied with pseudo-first order and pseudo-second order. Furthermore, the maximum adsorption capacity of the algae with chitosan nanocomposite toward malachite green dye reached as high as 15.5mg/g, respectively. Finally, multiple times reusing of algae with chitosan nanocomposite and removing dye from a real wastewater has made it a promising and attractive option for further practical applications.
Climate Change All over the World .pptxsairaanwer024
Climate change refers to significant and lasting changes in the average weather patterns over periods ranging from decades to millions of years. It encompasses both global warming driven by human emissions of greenhouse gases and the resulting large-scale shifts in weather patterns. While climate change is a natural phenomenon, human activities, particularly since the Industrial Revolution, have accelerated its pace and intensity
Optimizing Post Remediation Groundwater Performance with Enhanced Microbiolog...Joshua Orris
Results of geophysics and pneumatic injection pilot tests during 2003 – 2007 yielded significant positive results for injection delivery design and contaminant mass treatment, resulting in permanent shut-down of an existing groundwater Pump & Treat system.
Accessible source areas were subsequently removed (2011) by soil excavation and treated with the placement of Emulsified Vegetable Oil EVO and zero-valent iron ZVI to accelerate treatment of impacted groundwater in overburden and weathered fractured bedrock. Post pilot test and post remediation groundwater monitoring has included analyses of CVOCs, organic fatty acids, dissolved gases and QuantArray® -Chlor to quantify key microorganisms (e.g., Dehalococcoides, Dehalobacter, etc.) and functional genes (e.g., vinyl chloride reductase, methane monooxygenase, etc.) to assess potential for reductive dechlorination and aerobic cometabolism of CVOCs.
In 2022, the first commercial application of MetaArray™ was performed at the site. MetaArray™ utilizes statistical analysis, such as principal component analysis and multivariate analysis to provide evidence that reductive dechlorination is active or even that it is slowing. This creates actionable data allowing users to save money by making important site management decisions earlier.
The results of the MetaArray™ analysis’ support vector machine (SVM) identified groundwater monitoring wells with a 80% confidence that were characterized as either Limited for Reductive Decholorination or had a High Reductive Reduction Dechlorination potential. The results of MetaArray™ will be used to further optimize the site’s post remediation monitoring program for monitored natural attenuation.
Epcon is One of the World's leading Manufacturing Companies.EpconLP
Epcon is One of the World's leading Manufacturing Companies. With over 4000 installations worldwide, EPCON has been pioneering new techniques since 1977 that have become industry standards now. Founded in 1977, Epcon has grown from a one-man operation to a global leader in developing and manufacturing innovative air pollution control technology and industrial heating equipment.
4. Discovering Knowledge
OOP PARADIGM
• Emphasis on objects (what objects are needed in this
program?) rather than procedure (what does this program
need to do?).
• Programs are divided into entities known as classes of objects.
• Data Structures are designed such that they characterize
objects.
• Functions that operate on data of an object are tied together
in data structures.
• Data is hidden and cannot be accessed by external functions.
• Objects communicate with each other through functions.
• New data and functions can be easily added whenever
necessary.
• Follows bottom up approach in program design.
4
7. Discovering Knowledge
Objects
• Objects are the basic run-time entities of an object
oriented system.
• They may represent a person, a place or any item
that the program must handle.
• Example
Representation of an object
7
8. Discovering Knowledge
Objects
Objects are made up of two "things":
• State (a.k.a. attributes/fields/properties + value)
- A given set of data which describes the object
- e.g., colour,size,amount,name,phoneNumber,etc...
• Behaviour (a.k.a. methods or functions)
- A set of operations that the object can perform
- e.g., walk, run, drive, sell, buy, transfer, computeTotal, open,
close, etc…
Identifying the state and behavior for real-world objects is a great
way to begin thinking in terms of object-oriented programming.
8
10. Discovering Knowledge
Classes
• A class defines the type of an object.
• A class is a prototype/template or a blue print of an object.
• A class is a specification, common to all objects of a
particular type.
• This specification contains the details of the data and
functions that act upon the data.(data+functions)
• Objects of a class are called individual instances of that
class.
• Any number of objects can be created based on a class.
10
11. Discovering Knowledge
Classes
• We can create object of a class using following
syntax,
• Syntax: ClassName objectName;
• Here ClassName is a class which is already defined
and objectName is any user-defined name.
• For example, if Student is a class,
Student shahid, kamran;
In the example, shahid and kamran are the names of the
objects of class Student. We can declare/create any number of
objects of a class.
11
12. Discovering Knowledge
Classes
• Diagram showing the relationship between Classes and Objects
• Other examples of classes are: Instructor, Student, Room, University,
Car, etc.
go to slide Number 28 12
13. Discovering Knowledge
Message Passing
• A message for an object is a request for execution of a
procedure and therefore will invoke a function in the
receiving object that generates the desired result.
• Message passing involves specifying the name of the
object, the name of the function i.e. message and the
information to be sent.
• Objects can communicate with each other by passing
messages same as people pass messages to each other.
• Objects can send or receive messages or information.
• Concept of message passing makes it easier to talk
about building systems that directly model or simulate
their real-world counterparts.
13
14. Discovering Knowledge
Message Passing
• For example, consider two classes Product and
Order. The object of the Product class can
communicate with the object of the Order
class by sending a request for placing order.
14
15. Discovering Knowledge
Abstraction
• Abstraction refers to the representation of necessary
features without including details or explanations.
• Classes use the concept of abstraction and are defined
as a list of abstract attributes and functions to operate
on these attributes.
• Data abstraction is a programming (and design)
technique that relies on the separation of interface and
implementation.
- Implementation denotes how variables are declared, how
functions are coded, etc. It is through interface (function
header/function signature) a communication is sent to the
object as messages.
15
16. Discovering Knowledge
Abstraction
• When you press a key on your
keyboard the character appears on
the screen, you need to know only
this, but How exactly it works
electronically, is not needed.
• Another Example is when you use the
remote control of your TV, you do not
bother about how pressing a key in
the remote changes the channel on
the TV. You just know that pressing
the + volume button will increase the
volume.
16
17. Discovering Knowledge
Encapsulation
• Encapsulation is the principle of object-oriented
programming.
• In simple words, “Encapsulation is a process of
binding data members (variables, properties) and
member functions (methods) into a single unit”.
17
18. Discovering Knowledge
Encapsulation
• The data is not accessible to the outside world, and
only those functions which are wrapped in the class
can access it.
• These functions provide the interface between the
objects data and the program. This insulation of the
data from direct access by the program is called data
hiding or information hiding.
• A Class is the best example of encapsulation.
18
19. Discovering Knowledge
Encapsulation
For example: Medical store
• Lets say you have to buy some medicines. You go to the
medical store and ask the chemist for the medicines.
• Only the chemist has access to the medicines in the store
based on your prescription.
• The chemist knows what medicines to give to you.
• This reduces the risk of you taking any medicine that is not
intended for you.
In this example,
• Medicines Æ Member Variables.
• Giving Medicine by Chemist Æ Member Methods.
• You Æ External Application or piece of Code.
19
20. Discovering Knowledge
Difference between Abstraction and
Encapsulation
S# Abstraction Encapsulation
1 Abstraction solves the problem in Encapsulation solves the problem in the
the design level. implementation level.
2 Abstraction is used for hiding the Encapsulation means hiding the code and
unwanted data and giving relevant data into a single unit to protect the data
data. from outside world.
3 Abstraction lets you focus on what Encapsulation means hiding the internal
the object does instead of how it details or mechanics of how an object
does it. does something.
4 Abstraction- Outer layout, used in
terms of design.
For Example:-
Outer Look of a Mobile Phone, like
it has a display screen and keypad
buttons to dial a number.
Encapsulation- Inner layout, used in terms
of implementation.
For Example:- Inner Implementation
details of a Mobile Phone, how keypad
button and Display Screen are connected
with each other using circuits.
20
21. Discovering Knowledge
Inheritance
• Inheritance is the process by which
object of one class acquire the
properties of objects of another
class.
• In OOP, the concept of inheritance
provides the idea of reusability.
This means that we can add
additional features to an existing
class without modifying it.
• This is possible by deriving a new
class from the existing one. The
new class will have combined
features of both the classes.
21
22. Discovering Knowledge
Inheritance
• For Example:
• Consider an example of family of three
members having a mother, father & son named
Jack.
• Jack father : tall and dark
• Jack mother: Short and fair
• Jack is tall and fair,so he is said to have
inherited the features of his father and mother
respectively.
22
23. Discovering Knowledge
Inheritance
• Through effective use of inheritance, you can
save a lot of time in your programming and
also reduce error.
• Which in turn will increase the quality of work
and productivity.
• We will explain all of the above in detail later
when we cover Inheritance.
23
24. Discovering Knowledge
Polymorphism
• Polymorphism is an important OOP concept.
• Polymorphism is a Greek term which means
the ability to take more than one form.
• In polymorphism an operation may show
different behavior in different instances.
Poly Morphism Polymorphism
(Many) (Forms) (Many Forms)
24
25. Discovering Knowledge
Polymorphism
• For example, + is used to make sum of two numbers
as well as it is used to combine two strings.
• This is known as operator overloading because same
operator may behave differently on different
instances.
25
26. Discovering Knowledge
Polymorphism
• Same way functions can be overloaded.
• For example, sum()function may take two
arguments or three arguments etc.
- i.e. sum (5, 7) or sum (4, 6, 8).
• Single function Draw() draws different objects.
26
27. Discovering Knowledge
Dynamic Binding
• Dynamic Binding is the process of linking of
the code associated with a procedure call at
the run-time”.
• Dynamic binding means that the code
associated with a given procedure call is not
known until the time of the call at run time.
27
29. Discovering Knowledge
What is a class?
1. Class is a blueprint of object(s).
2 Objects created from the same class are similar but not the same.
3. The objects are similar because each has similar property type.
4. Each is different because the property value is different.
5. Analogy:
a. Cars built and assembled based on the same blueprint will
definitely look similar in design. However each car differs in
serial numbers, configuration, appearance, etc.
Car
blueprint
Actual cars
CLASS OBJECT(S)
35
30. Discovering Knowledge
Class Syntax
1. We know a classname if there is keyword “class” before the name.
2. The body of the class is enclosed in curly braces {}.
<access specifier>class ClassName{}
3. Hence, the syntax of a class is:
4 An empty class is useless as it cannot be used to store any attribute or have
any behavior.
5. Hence, the body of a class should contain the following members:
1. One or more fields (a.k.a. attributes). public class ClassName {
2. One or more constructors.
3. One or more methods.
int field1;
String field2;
ClassName(){}
void method1(){}
String method2(int arg){}
}
36
31. Discovering Knowledge
Class Diagram
1. Class Diagram is a graphical representation of the actual class.
2. Because Class Diagram is more readable than code, it is often used to draft
the class design before the actual coding.
a. Designing solutions using diagram is easier and faster.
b. Validating the design is easier.
ClassName
field1:int
field2:String
method1():int
method2(arg:int):String
Class diagram
public class ClassName {
int field1;
String field2;
int method1(){}
String method2(int arg){}
}
Java code
37
32. public class Website {
String webName;
int webAge;
public static void main(String args[]){
//Creating objects
Website obj1 = new Website();
obj1.webName="Amazon";
obj1.webAge=4;
Website obj2 = new Website();
obj2.webName="Google";
obj2.webAge=14;
//Accessing object data through reference
System.out.println(obj1.webName+" "+obj1.webAge);
System.out.println(obj2.webName+" "+obj2.webAge);
}
}
Output:
Amazon 4
Google 14
33. ACTIVITY
Create a Student class with fields
name,reg_id,cgpa,semester and in main create 4 objects
with name Umar, Hasan,Maria, Anum and enter their
respective information there. Also display their relevant
information with their names:
34. Let’s see how can we take input from the user for the attributes we
have set in the class for various objects.
System.out.println("Enter your website");
obj1.webName=scVar.next();
System.out.println("Enter your WebAge");
obj1.webAge=scVar.nextInt();
System.out.println("Enter your website");
obj2.webName=scVar.next();
System.out.println("Enter your WebAge");
obj2.webAge=scVar.nextInt();
36. Discovering Knowledge
Class Diagram Components
1. Class diagram contains 4 segments:
a. The top segment is the class name.
b. Fields.
c. Constructor(s)
d. Method(s)
2. Because every class must have a constructor, it is understood that there should be one,
even if the constructor segment is sometimes omitted from the diagram.
<Class Name> Account
<Field(s)> customer: String
Account Nbr: int
<Constructor(s)>
<Method(s)> getBalance():double
Syntax Example
38
37. CONSTRUCTORS IN JAVA:
A constructor in Java is a block of code similar to a method that’s called when an
instance of an object is created. Here are the key differences between a constructor
and a method:
• A constructor doesn’t have a return type.
• The name of the constructor must be the same as the name of the class.
• Unlike methods, constructors are not considered members of a class.
• A constructor is called automatically when a new instance of an object is created.
Here’s the basic format for coding a constructor:
public ClassName (parameter-list)
{
statements...
}
38. The public keyword indicates that other classes can access the constructor.
ClassName must be the same as the name of the class that contains the
constructor. You code the parameter list the same way that you code it for a
method.
For Example:
Let’s see an example how we can create a constructor explicitly
39. public Actor(String first, String last)
{
firstName = first;
lastName = last;
}
Actor a = new Actor("Arnold", " Schwarzenegger"); //CALLING CONSTRUCTOR
If you do not provide a constructor for a class, Java will automatically create a
default constructor that has no parameters and doesn’t initialize any fields. This
default constructor is called if you specify the new keyword without passing
parameters.
For example:
Ball b = new Ball(); //CALLING DEFAULT CONSTRUCTOR
Here, a variable of type Ball is created by using the default constructor for the Ball
class.
40. For Example: Here passing argument to the constructor while calling it
public class Puppy {
public Puppy(String name) {
// This constructor has one parameter, name.
System.out.println("Passed Name is :" + name );
}
public static void main(String []args) {
// Following statement would create an object myPuppy
Puppy myPuppy = new Puppy( "tommy" );
}
} OUTPUT:
Passed Name is :tommy
41. Accessing Instance Variables and Methods
Instance variables and methods are accessed via created objects. To access an
instance variable, following is the fully qualified path.
This example explains how to access instance variables and methods of a class.
public class Puppy {
int puppyAge;
public Puppy(String name) {
// This constructor has one parameter, name.
System.out.println("Name chosen is :" + name );
}
public void setAge( int age ) {
puppyAge = age;
}
public int getAge( ) {
System.out.println("Puppy's age is :" + puppyAge );
return puppyAge;
}
42. public static void main(String []args) {
/* Object creation , passing name to constructor*/
Puppy myPuppy = new Puppy( "tommy" );
/* Call class method to set puppy's age */
myPuppy.setAge( 2 );
/* Call another class method to get puppy's age */
myPuppy.getAge( );
/* You can access instance variable as follows as well */
System.out.println("Variable Value :" + myPuppy.puppyAge );
}
} OUTPUT:
Name chosen is :tommy
Puppy's age is :2
Variable Value :2
43. CLASS WORK:
Repeat the last program when you have to take the
values from the User, i.e Puppy’s name and age.
44. NAMED METHODS :
Creating Method
Considering the following example to explain the syntax of a method −
Syntax
public static int methodName(int a, int b) {
// body
}
Here,
• public static − modifier
• int − return type
• methodName − name of the method
• a, b − formal parameters
• int a, int b − list of parameters
45. /* the snippet returns the minimum between two numbers */
public static int minFunction(int n1, int n2) {
int min;
if (n1 > n2)
min = n2;
else
min = n1;
return min;
}
46. Discovering Knowledge
Practical example 1
public class Account
Account
customer: String
Balance: double
getBalance():double
Class diagram
{
from
diagram to
code
}
String customer;
double balance;
double getBalance()
{
return balance;
}
Java code
39
47. Discovering Knowledge
Practical example 2
public class BMI {
double weight;
double height;
BMI
weight: double
height: double
getInput() : void
calculateBMI(): double
findStatus(): String
printStatus(): void
Class diagram
from
diagram to
code
Java code
}
void getInput() {
weight =
input.nextDouble();
height =
input.nextDouble();
}
double calculateBMI() {
return
weight/(height*height)*703;
}
String findStatus(){
//follow the criteria
return status;
}
void printStatus() {
S.O.P(bmi and status);
}
40
48. Discovering Knowledge
Class Diagram and Algorithm
1. Usually a comment box is used as a label to further describe the
algorithm applied to a particular method.
Student
name: String
Algorithm:
greet():void 1. Print “Hello” and student name.
class Student{
String name;
void greet(){
System.out.print(“Hello” + name);
}
}
41
49. Discovering Knowledge
Application Class
1. Application class is also known by other names
such as Driver , Test, Main or Launcher class.
2. Application class is a class that contains the
main method.
• public static void main(String [] args){}
3. Not every class will contain the main method.
4. If a program is made up of only one class, that
class definitely has to become the application
class.
5. If a program is made up of many classes, only
one of the classes need to be the application
class.
6 Application class will be the first class loaded
and executed.
ClassName
+main(String[] args):void
Example 1
Student
name: String
greet():void
+main(String[] args):void
Example 2
42
50. Discovering Knowledge
Application Class
1. Student class is an application class because it contains the
main method.
2. Hence, when the program runs, it will seek for the first line of
code in the main method and execute in a top-down manner.
Student
name: String
main():void
greet():void
Algorithm:
1. Create Student object.
2. Invoke method greet()
3. End
Algorithm:
1. Print “Hello” and name.
43
51. Discovering Knowledge
Discussion: Class Members
class Country {
String name = “Pakistan";
public static void main(String[] args){
Country pakistan = new Country();
pakistan.greet();
}
void greet(){
System.out.println(“Welcome to " + name);
}
}
1. Describe what happens within the main method.
2. Describe what happens within the greet() method.
3. Is this programming object-oriented? How do you know?
44
52. Discovering Knowledge
Discussion: Class Members
class Country {
String name = “Pakistan";
public static void main(String[] args){
Country pakistan = new Country();
pakistan.greet();
}
void greet(){
System.out.println(“Welcome to " + name);
}
}
This step creates an object called pakistan from Country class.
What does the object pakistan do?
45
53. Discovering Knowledge
Discussion: Class Members
class Country {
String name = “Pakistan";
public static void main(String[] args){
Country pakistan = new Country ();
pakistan.greet();
}
void greet(){
System.out.println(“Welcome to " + name);
}
}
Can the method access the field’s value?
What is the output?
46
54. Discovering Knowledge
Accessing Class Members
1. Fields and methods are object members.
2. Object members are accessible using the dot notation.
3. Note that members are accessible through object variable,
not through class.
4. E.g.:
Car myCar = new Car(“AXE8888”);
myCar.engineNo = “MGH05GX100085”;
myCar.changeOwner(“Akram”);
47
56. Discovering Knowledge
Importing and Using Foreign Classes
1 package finance;
2 import java.util.Date;
3 // Additional import statements if required
4 class Stock {
7 // Implementation of the stock class
8 }
• Where declared?
• When required?
• import java.util.*;
• The java.lang package
49
57. Discovering Knowledge
Summary
• Abstraction: Eliminate the irrelevant, amplify the
essential.
• Encapsulation: Hiding the unnecessary.
• Inheritance: Modeling the simplicity.
• Polymorphism: Same function different behaviour.
• Class is a blueprint/template of object(s).
• Class contains constructor so that the class can be
used to create new object(s).
• Class contains fields to store values that can be used
to describe the object.
• Class contains methods to allow operations that
modify the values held by fields.
50