0% found this document useful (0 votes)
4 views

Unit 4 - Classes Visual Programming - INF1511

Unit 6 of Visual Programming 1 focuses on the theory and practical application of classes in programming, including concepts such as inheritance, polymorphism, and method overriding. Students are required to have prior knowledge from Units 1-5 and will complete assessments including quizzes and programming activities on Jupyter Notebook. The unit emphasizes the importance of classes as templates for creating objects and managing data and operations.

Uploaded by

SurethaErasmus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Unit 4 - Classes Visual Programming - INF1511

Unit 6 of Visual Programming 1 focuses on the theory and practical application of classes in programming, including concepts such as inheritance, polymorphism, and method overriding. Students are required to have prior knowledge from Units 1-5 and will complete assessments including quizzes and programming activities on Jupyter Notebook. The unit emphasizes the importance of classes as templates for creating objects and managing data and operations.

Uploaded by

SurethaErasmus
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

lOMoARcPSD|3204666

2024 Unit6 Classes - Visual Programming 1 (INF1511)

Visual Programming 1 (University of South Africa)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)
lOMoARcPSD|3204666

INF1511 Unit 6
Visual Programming I

Classes

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

Assumptions

• Installed Jupyter Notebook.


• Done the theory self-assessments for Units 1-5
• Watched all the recordings for Units 1-5.

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

Overview Unit 6
• The theory of classes in programming.
• The practical application (and demonstration)
of classes in programming.
• The assessment of learning in this unit.

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

Programming elements
• Literals - _______________________________________
• Variables - ______________________________________
• Keywords (30 in Python … and else elif exec … )
• Comments #
• A keyword is IF and ELIF
• A keyword is FOR
• A keyword is WHILE
• Functions are declared! The keyword is ……
• CLASS?

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

Theory – What are classes in programming?

• Classes are ….
• A system. There is always input, processing
and output.
• A function has input, processing and output.
• A class has attributes and functions!

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

Class – OO and re-use of code

• Define a class.
• A template/blueprint – DATA and OPERATIONS.
• Use the class attributes – variables (data
members) and methods (member functions).
• Define the functions in a class.
• From classes – create instances – objects.
• Classes can be independent or inherit (from a
base class).
Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)
lOMoARcPSD|3204666

Class

• Access the class variables in instance


methods.
• Create a class instance.
• Initialize a class instance.
• Class and Static methods.

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

More Class

• Inheritance - single, multi-level and multiple.


• Control specifiers.
• Method overriding.
• Operator overloading.
• Polymorphism.
• Use of properties and descriptors.

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

Assessment for Unit 6

• Theory MCQ quiz. Three attempts.


• Programming activities for this unit on Jupyter
Notebook page. Use to complete Assignment 6.
• Practical MCQ quiz (Assignment 6) available.
One attempt.

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

Assessment Plan – NO EXTENSIONS

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

Practical application

• Demonstrate the syntax and use of classes


• Using ANACONDA programming environment.

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)


lOMoARcPSD|3204666

Downloaded by Suretha Erasmus-Falgate (suretha.eras@gmail.com)

You might also like