TO UNDERSTAND about Structure in C.
TO LEARN ABOUT How to Declare Structure in C.
To learn about how to store Structure in Memory.
To understand copy of structure elements in c.
To understand about nested structure in C.
TO LEARN ABOUT how to use Array of structure in C.
To learn about Union in C.
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...ssuserd6b1fd
C programming language notes for beginners and Collage students. Written for beginners. Colored graphics. Function by Function explanation with complete examples. Well commented examples. Illustrations are made available for data dealing at memory level.
TO UNDERSTAND about Structure in C.
TO LEARN ABOUT How to Declare Structure in C.
To learn about how to store Structure in Memory.
To understand copy of structure elements in c.
To understand about nested structure in C.
TO LEARN ABOUT how to use Array of structure in C.
To learn about Union in C.
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 4 of 5 by...ssuserd6b1fd
C programming language notes for beginners and Collage students. Written for beginners. Colored graphics. Function by Function explanation with complete examples. Well commented examples. Illustrations are made available for data dealing at memory level.
Gentle Introduction to Functional ProgrammingSaurabh Singh
This slide is basically aimed at professionals and students to introduce them with functional programming.
I haven't used much functional programming terminologies because I personally feel they could be overwhelming to people getting introduced to FP for the first time. For similar reasons I have deliberately avoided using any functional programming language and kept the discussions programming language agnostic as far as possible.
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 5 of 5 by...ssuserd6b1fd
C programming language notes for beginners and Collage students. Written for beginners. Colored graphics. Function by Function explanation with complete examples. Well commented examples. Illustrations are made available for data dealing at memory level.
In this short presentation struct inheritance and virtual member function in pure C are demonstrated. With these fundamental techniques, more advanced design patterns are unlocked.
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...ssuserd6b1fd
C++ programming language notes for beginners and Collage students. Written for beginners. Colored graphics. Function by Function explanation with complete examples. Well commented examples. Illustrations are made available for data dealing at memory level.
Gentle Introduction to Functional ProgrammingSaurabh Singh
This slide is basically aimed at professionals and students to introduce them with functional programming.
I haven't used much functional programming terminologies because I personally feel they could be overwhelming to people getting introduced to FP for the first time. For similar reasons I have deliberately avoided using any functional programming language and kept the discussions programming language agnostic as far as possible.
Notes for C Programming for MCA, BCA, B. Tech CSE, ECE and MSC (CS) 5 of 5 by...ssuserd6b1fd
C programming language notes for beginners and Collage students. Written for beginners. Colored graphics. Function by Function explanation with complete examples. Well commented examples. Illustrations are made available for data dealing at memory level.
In this short presentation struct inheritance and virtual member function in pure C are demonstrated. With these fundamental techniques, more advanced design patterns are unlocked.
Notes for C++ Programming / Object Oriented C++ Programming for MCA, BCA and ...ssuserd6b1fd
C++ programming language notes for beginners and Collage students. Written for beginners. Colored graphics. Function by Function explanation with complete examples. Well commented examples. Illustrations are made available for data dealing at memory level.
Value Objects, Full Throttle (to be updated for spring TC39 meetings)Brendan Eich
Slides I prepared for the 29 January 2014 Ecma TC39 meeting, on Value Objects in JS, an ES7 proposal -- this one shotgunned the roadmap-space of declarative syntax, to find the right amount per TC39 (nearly zero, turns out).
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
1. 1
Inheritance and Polymorphism
Andrew Davison
Noppadon Kamolvilassatian
Department of Computer Engineering
Prince of Songkla University
2. 2
Contents
1. Key OOP Features
2. Inheritance Concepts
3. Inheritance Examples
4. Implementing Inheritance in C++
5. Polymorphism
6. Inclusion (Dynamic Binding)
7. Virtual Function Examples
8. C++ Pros and Cons
3. 3
1. Key OOP Features
ADTs (done in the last section)
Inheritance
Polymorphism
4. 4
2. Inheritance Concepts
Derive a new class (subclass) from an existing class (base class or superclass).
Inheritance creates a hierarchy of related classes (types) which share code and interface.
5. 5
3. Inheritance Examples
Base ClassDerived ClassesStudentCommuterStudentResidentStudentShapeCircleTriangleRectangleLoanCarLoanHomeImprovementLoanMortgageLoan
6. 6
More Examples
Base ClassDerived ClassesEmployeeManagerResearcherWorkerAccountCheckingAccountSavingAccount
7. 7
University community members
Employee
CommunityMember
Student
Faculty
Staff
Administrator
Teacher
8. 8
Shape class hierarchy
TwoDimensionalShape
Shape
ThreeDimensionalShape
Circle
Square
Triangle
Sphere
Cube
Tetrahedron
9. 9
Credit cards
logo
american express
hologram
card
owner’s name
inherits from (isa)
visa card
master card
pin
category
10. 10
4. Implementing Inheritance in C++
Develop a base class called student
Use it to define a derived class called grad_student
11. 11
The Student Class Hierarchy
student
print() year_group()
grad_student
print()
inherits (isa)
student_id, year, name
dept, thesis
12. 12
Student Class
class student { public: student(char* nm, int id, int y); void print(); int year_group() { return year; } private: int student_id; int year; char name[30]; };
13. 13
Member functions
student::student(char* nm, int id, int y) { student_id = id;
year = y;
strcpy(name, nm); } void student::print() { cout << "n" << name << ", " << student_id << ", " << year << endl; }
14. 14
Graduate Student Class
class grad_student: public student { public: grad_student(char* nm, int id, int y, char* d, char* th); void print(); private: char dept[10]; char thesis[80]; };
15. 15
Member functions
grad_student::grad_student(char* nm, int id, int y, char* d, char* th) :student(nm, id, y) { strcpy(dept, d); strcpy(thesis, th); } void grad_student::print() { student::print(); cout << dept << ", " << thesis << endl; }
19. 19
Output
$ g++ -Wall -o gstudent gstudent.cc $ gstudent Student classes example: Student s1: Jane Doe, 100, 1 Year 1 Grad student gs1: John Smith, 200, 4 Pharmacy, Retail Thesis Year 4 :
continued
20. 20
ps, pointing to s1: Jane Doe, 100, 1 ps, pointing to gs1: John Smith, 200, 4 pgs, pointing to gs1: John Smith, 200, 4 Pharmacy, Retail Thesis $
student print() used.
grad_student print() used.
21. 21
Notes
The choice of print() depends on the pointer type, not the object pointed to.
This is a compile time decision (called static binding).
22. 22
5. Polymorphism
Webster: "Capable of assuming various forms."
Four main kinds:
1. coercion
a / b
2. overloading
a + b
continued
23. 23
3. inclusion (dynamic binding)
–Dynamic binding of a function call to a function.
4. parametric
–The type argument is left unspecified and is later instantiated
e.g generics, templates
24. 24
6. Inclusion (dynamic binding)
5.1. Dynamic Binding in OOP
5.2. Virtual Function Example
5.3. Representing Shapes
5.4. Dynamic Binding Reviewed
25. 25
Dynamic Binding in OOP
X
print()
Classes
Y
print()
Z
print()
inherits (isa)
X x; Y y; Z z; X *px; px = & ??; // can be x,y,or z px->print(); // ??
26. 26
Two Types of Binding
Static Binding (the default in C++)
–px->print() uses X’s print
–this is known at compile time
Dynamic Binding
–px->print() uses the print() in the object pointed at
–this is only known at run time
–coded in C++ with virtual functions
27. 27
Why “only known at run time”?
Assume dynamic binding is being used: X x; Y y; Z z; X *px; : cin >> val; if (val == 1) px = &x; else px = &y; px->print(); // which print() is used?
28. 28
7. Virtual Function Examples
class B { public: int i; virtual void print() { cout << "i value is " << i << " inside object of type Bnn"; } }; class D: public B { public: void print() { cout << "i value is " << i << " inside object of type Dnn"; } };
29. 29
Use
int main() { B b; B *pb; D d; // initilise i values in objects b.i = 3; d.i = 5; :
31. 31
Output
$ g++ -Wall -o virtual virtual.cc $ virtual pb now points to b Calling pb->print() i value is 3 inside object of type B pb now points to d Calling pb->print() i value is 5 inside object of type D $
33. 33
C++ Shape Classes
class shape { public: virtual double area() = 0; }; class rectangle: public shape { public: double area() const {return (height*width);} : private: double height, width; };
34. 34
class circle: public shape { public: double area() const {return (PI*radius*radius);} : private: double radius; }; // etc
35. 35
Use:
shape* p[N]; circle c1,...; rectangle r1,...; : // fill in p with pointers to // circles, squares, etc p[0] = &c1; p[1] = &r1; ... : : // calculate total area for (i = 0; i < N; ++i) tot_area = tot_area + p[i]->area();
36. 36
Coding shape in C
enum shapekinds {CIRCLE, RECT, ...}; struct shape { enum shapekinds s_val; double centre, radius, height, ...; : /* data for all shapes must go here */ };
continued
37. 37
double area(shape *s) { switch (s->s_val) { case CIRCLE: return (PI*s->radius*s->radius); case RECT: return (s->height*s->width); : /* area code for all shapes must go here */ }
add a new kind of shape?
38. 38
Dynamic Binding Reviewed
Advantages:
–Extensions of the inheritance hierarchy leaves the client’s code unaltered.
–Code is localised – each class is responsible for the meaning of its functions (e.g. print()).
Disadvantage:
–(Small) run-time overhead.
39. 39
8. C++ Pros and Cons
6.1. Reasons for using C++
6.2. Reasons for not using C++
40. 40
8.1 Reasons for using C++
bandwagon effect
C++ is a superset of C
–familiarity
–installed base can be kept
–can ‘pretend’ to code in C++
efficient implementation
continued
41. 41
low-level and high-level features
portable
a better C
no need for fancy OOP resources
42. 42
8.2 Reasons for not using C++
a hybrid
size
confusing syntax and semantics
programmers must decide between efficiency and elegance
no automatic garbage collection