COURSEPACK - BTech (II Sem) - OOP
COURSEPACK - BTech (II Sem) - OOP
SCHEME
The scheme is an overview of work-integrated learning opportunities and gets students out into the real world. This
will give what a course entails.
Object-Oriented Comprehensive
Course Title Course Type
Programming
B.Tech (CSE) II
Course Code E2UC201C Class
Sem
Weekly
Activity Credits Total Number of Classes Assessment in
Hours
Weightage
Lecture 3 3 per Semester
Self-study
Practical 1 2
Practical
Tutorial
Theory
Self-
SEE
1 8
CIE
study
Theory Practical
Anubhav Kumar Anubhav Kumar
Kumar Manoj Kumar Manoj
Nipendra Dwivedi Nipendra Dwivedi
Akhilendra Kumar Khare Akhilendra Kumar Khare
Amit Kumar Amit Kumar
Names of Course Rahul Rahul
Instructors Shabir Ali Shabir Ali
Anurag Singh Anurag Singh
Ashwini Kumar Pradhan Ashwini Kumar Pradhan
Dewan Imdadul Islam Dewan Imdadul Islam
Fatima Ziya Fatima Ziya
Gurpreet Singh Gurpreet Singh
K. Prabu K. Prabu
Manmohan Singh Manmohan Singh
Neha Neha
Nitin Shukla Nitin Shukla
Pragati Gupta Pragati Gupta
Prem Kant Prem Kant
S Karpaga Selvi S Karpaga Selvi
R. Muthuganesh R. Muthuganesh
Rahul Anjana Rahul Anjana
Rajiv Chourasiya Rajiv Chourasiya
Rakesh Sahu Rakesh Sahu
S P Ramesh S P Ramesh
Shwet Ketu Shwet Ketu
Shweta Mayor Sabharwal Shweta Mayor Sabharwal
Sonu Kumar Jha Sonu Kumar Jha
Subash Harizan Subash Harizan
Tarachand Verma Tarachand Verma
Vijaya Choudhary Vijaya Choudhary
COURSEPACK |
FORMAT
Vineeta Vineeta
Vivek Kumar Sharma Vivek Kumar Sharma
Vivek Sharma Vivek Sharma
Yamini Singh Yamini Singh
Yogendra Kumar Yogendra Kumar
COURSE OVERVIEW
"Object-Oriented Programming" course provides a good understanding of object-oriented concepts and
implementation in Python programming. This course will improve the Python programming skills of
developers who have a basic understanding of Python. You will learn Object Oriented features of Python
programming which will help in providing efficient solutions for software projects.
PREREQUISITE COURSE
COURSE OBJECTIVE
• To teach Object-oriented Concepts and introduce programming basics using Python.
• Guide the students to build simple applications using Object-oriented Programming Concepts using
Python Language.
COURSE OUTCOMES(COs)
After the completion of the course, the student will be able to:
Course Upon successful completion of this course, the student will be able to:
Outcomes
E2UC201C.5. Create simple software applications using Python GUI for some potential users.
COURSEPACK |
FORMAT
BLOOM’S LEVEL OF THE COURSE OUTCOMES
Bloom's taxonomy is a set of hierarchical models used for the classification of educational learning
objectives into levels of complexity and specificity. The learning domains are cognitive, affective, and
psychomotor.
COMPREHENSIVE
E2UC201C.1 √ √
E2UC201C.2 √ √
E2UC201C.3 √ √
E2UC201C.4 √ √
E2UC201C.5 √ √ √ √ √
COURSEPACK |
FORMAT
Individual and team work: Function effectively as an individual, and as a
PO9
member or leader in diverse teams, and in multidisciplinary settings.
Communication: Communicate effectively on complex engineering
activities with the IT analyst community and with society at large, such as,
PO10 being able to comprehend and write effective reports and design
documentation, make effective presentations, and give and receive clear
instructions.
Project management and finance: Demonstrate knowledge and
understanding of the computing science and management principles and
PO11
apply these to one’s own work, as a member and leader in a team, to
manage projects and in multidisciplinary environments.
Life-long learning: Recognize the need for, and have the preparation and
PO12 ability to engage in independent and life-long learning in the broadest
context of technological change.
Have the ability to work with emerging technologies in computing requisite to Industry
PSO1
4.0.
Demonstrate Engineering Practice learned through industry internship and research project
PSO2
to solve live problems in various domains.
COURSEPACK |
FORMAT
COURSE ASSESSMENT
The course assessment patterns are the assessment tools used both in formative and summative examinations.
^
Typical Rubric for the Course-based project
Type of Assessment Preliminary Project Technical
TRL-1 Viva-voce
Tools Plan Seminar
Course-based Project
05 05 10 05
Work
PPP (Preliminary Project Plan): The preliminary project plan (PPP) provides an initial, overview of
the project and all of its known parameters. It outlines the project's objectives, relevance to the
program, merit, and conformity to current industry/government policy, proposed methodology, and
expected outcomes. It should also include any known constraints related to the time frame (Gantt
Chart), budget, etc.
TRL (Technology Readiness Level)-1:
Basic Research: Initial scientific research has been conducted. Principles are qualitatively
postulated and observed. Focus is on new discovery rather than applications.
COURSEPACK |
FORMAT
COURSE CONTENT
THEORY+ PRACTICAL
THEORY:
INTRODUCTION TO OOP:
Purpose of Object-Oriented Programming-Classes and Objects-Class Attributes -Class variable-methods and
Instance variable-methods-working of an object-constructor-type of contractor-destructor-Advantages of
using destructor-Pillars_of_OOPS: Encapsulation-Access-specifier: public-private-protected-Polymorphism:
function and objects-Overriding (Run time polymorphism)-Overloading-Different between method
overloading and overriding.
FUNCTIONAL PROGRAMMING:
Lambda function-First class, higher order, and proxy function-Iterators- Performance of Generators:
importance and needs Performance of Generators-Decorators: function with parameter and arguments-Class
method and static method decorators-Map, Filter, Zip, Reduce, –Regular Expressions -Comprehensions: List,
tuples, set, and Dictionary- Modules and packages: import packages, built-in modules, package index, pip
install, Virtual Environments.
PYTHON GUI:
Introduction to Tkinter, settling widgets in the window's interior, Numeric Widgets, Boolean Widgets,
Selection Widgets, String Widgets, Date Picker, Color Picker, Container Widgets, creating GUI Application
with Tkinter, button, canvas, Geometry Management, Binding Function, Working with image.
PRACTICAL: Creating a Class and Object; Class with constructor; Inheritance; Polymorphism; Multiple
Inheritance; Abstract base classes; Class Methods and Static Methods; Composition; Operator Overloading;
Exception Handling; Composition and aggregation; Method Overriding; Lambda functions; Loan Calculator
using Tkinter; Popup Menu based Arithmetic Operations using Tkinter; Display an Image and its
Transformation using Tkinter and OpenCV-Python.
COURSEPACK |
FORMAT
LESSON PLAN FOR INTEGRATED COURSES of 3 CREDITS
FOR THEORY 15 weeks * 2 Hours = 30 Classes) (1credit = 1Lecture Hour)
FOR PRACTICAL 15 weeks * 2Hours = 30 Hours lab sessions (1 credit = 2 lab hours)
Theory / Tutorial /
L-No Topic for Delivery Skills Competency
Practical Plan
INTRODUCTION TO OOP: Interpret the
1 Purpose of Object-Oriented Programming-Classes Theory principles of the CO1
and Objects-Class Attributes object-oriented
programming
Class variable-methods and Instance variable-
2 Theory paradigm. CO1
methods-working of an object
COURSEPACK |
FORMAT
Any method for which implementation is
unknown can be marked as Abstract method.
(prefix keyword abstract). If any method
in the class is marked abstract, then the class as
well is marked as abstract. Moreover, Objects cant
11 be created for an abstract class thus addressing the Practical
above issue. Hmmm.. Lets try it out. We need a
method to calculate service tax on every
transaction. To keep things simple, let's assume its
10% for Savings, 20% for Checking and 5% for
Demat. Make the method abstract in the Account
class and override in child
classes.
Create a abstract class Account with 3 private data
member variables -accountNumber of type String,
balance of type double, holderName of type String CO1, CO2
and methods - display() and an abstract method
calculateServiceTax() with an argument of type int
and return type as double;
Create the class CheckingAccount which extends
12 the class Account Create the class SavingsAccount Practical
which extends the class
Account . Create the class DematAccount which
extends the class Account . Use Appropriate
Getters Setters for the above
classes.
Create a driver class named Main which creates an
instance of the above mentioned classes.
Service Tax must be calculated seperately for all
the base class (value must be round to 2 decimal
place).
13 Polymorphism: function and objects Theory CO3
14 Overriding (Run time polymorphism) Theory CO3
22 Practical
Types of Inheritance: single level Inheritance- Implement the
23 Theory CO3
multilevel-mutiple and hierarchal concept of
inheritances for a
24 Super() methods Theory CO3
problem solution
The Matrix class has methods for each of the
following:
1 - get the number of rows
2 - get the number of columns
25 Practical
3 - set the elements of the matrix at given position
(i,j) CO1,CO3
4 - adding two matrices. If the matrices are not
addable, "Matrices cannot be added" will be
displayed.
5 - multiplying the two matrices note - print
26 Practical
'invalid' on invalid input, no need to print options
and 2x2 matrix is suffice
27 method resolution order-diamond problem Theory Use interface in CO3
28 Overriding-Interfaces Theory python programs CO3
COURSEPACK |
FORMAT
Write a program to print the area and circumfrence
of a circle having radius r units by creating a class
named 'circle' without any parameter in its
constructor.
29 Practical
CO1, CO3
30 Practical
COURSEPACK |
FORMAT
Write a program to print the area and perimeter of
38 a triangle having sides of a, b and c units by Practical
CO1, CO4
creating a class named 'Triangle' with constructor
having the three sides as its parameters.
39 Practical
40 Iterators Theory CO4
Performance of Generators: importance and
41 Theory CO4
needs Performance of Generators
Apply the
generator in
Write a program to print the area and perimeter of python
42 Practical
a triangle having sides of a, b and c units by CO1, CO4
creating a class named 'Triangle' without any
parameter in its constructor.
43 Practical
Decorators: function with parameter and
44 Theory CO4
arguments
45 Class method and static method decorators Theory CO4
Create a class called 'Matrix' containing
constructor that initializes the number of rows Use decorators
and number of columns of a new Matrix object. with class and
46 The Matrix class has the following information: Practical static methods
1 - print number of rows of matrix 2 - print CO1, CO4
number of columns of matrix 3 - print elements
of matrix in the form of 2D array.
47 Practical
48 Map, Filter, Zip, Reduce, Regular Expressions Theory CO4
49 Comprehensions: List, tuples, set and Dictionary Theory CO4
72 Revision Theory
BIBLIOGRAPHY
Text Book:
1. The Complete Reference Python, Martin C. Brown, McGraw Hill, Fourth edition (20 March
2018)
2. Head First Python: a Brain-Friendly Guide by Paul Barry (Author), Dawn Griffiths,
Shroff/O'Reilly; Second Edition (1 January 2012).
Reference Books:
1. Python In-Depth by Ahidjo Ayeva, Kamon Ayeva, Aiman Saed, BPB Publication (1 OCT 2020).
2. Introduction to programming using Python, Y. Daniel Liang, Pearson Education; First Edition
(26 February 2017).
3. Mastering Python, Rick Van Hatten, Packet Publishing House (29 April 2016).
4. Starting out with Python, Tony Gaddis, Pearson, 4th edition (17 May 2017).
COURSEPACK |
FORMAT
Webliography:
1. https://docs.python.org/3/tutorial/
SWAYAM/NPTEL/MOOCs Certification:
1. https://onlinecourses.swayam2.ac.in/cec22_cs20/preview
2. https://onlinecourses.nptel.ac.in/noc22_cs32/preview
3. https://onlinecourses.nptel.ac.in/noc19_cs42/preview
COURSEPACK |
FORMAT
PRACTICE PROBLEMS
(Assignments) (Min 45 Problems*)
8 K3
Discuss the importance of access modifiers (e.g., public, private, protected) in
achieving the objectives of Object-Oriented Programming (OOP) in Python.
9 K3
Explain how a destructor can be defined and utilized in a Python class.
10 K3
Explore the usage of the 'private' access modifier in Python and discuss its
11 implications. K3
Enumerate the different types of polymorphism in Object-Oriented Programming
(OOP) in Python.
12 K3
Develop a Python program that overloads the operator + and > for a custom class.
13 K3
Demonstrate method overriding in Python to achieve runtime polymorphism with
a code example.
14 K3
Discuss the advantages and disadvantages of compile-time polymorphism
15 compared to runtime polymorphism in Python. K3
Explain how method overriding showcases runtime polymorphism in Python.
16 K3
COURSEPACK |
FORMAT
Create a Python code example illustrating data overloading by defining multiple
17 attributes with the same name in a class. K3
Differentiate between data overloading and data overriding in Python.
18 K3
Define data overriding and provide an example demonstrating it in Python.
19 K3
Present a Python code example showcasing data overloading using multiple
20 constructors with different parameters. K3
List and explain the exceptions in Python.
21 K3
Describe how to handle exceptions using try, except, and finally blocks in
22 Python. K3
Explain the purpose of the raise statement in Python.
23 K3
Discuss the use of the except clause without an exception type in Python.
24 K3
Highlight the differences between the except and else blocks in Python exception
25 handling. K3
Explain how to handle multiple exceptions in a single except block in Python.
26 K3
Determine if it is possible to include other statements between 'try,' 'catch,' and
'finally' blocks in Python.
27 K3
Elaborate on the concept of an unreachable catch block error in Python.
28 K3
Differentiate between errors and exceptions in Python.
29 K3
Enumerate and explain the types of exceptions in Python.
30 K3
Explain the purpose of the finally block in Python exception handling.
31 K3
Discuss the concept of custom exceptions in Python.
32 K3
Explain the purpose of the assert statement in Python.
33 K3
Differentiate between a built-in exception and a custom exception.
34 K3
Describe how to re-raise an exception in Python.
35 K3
Clarify the purpose of inheritance in Python.
36 K3
Define the role of the super() function in Python.
37 K3
COURSEPACK |
FORMAT
Differentiate between throw, throws, and throwable in Python.
38 K3
Explain the StackOverflowError in Python.
39 K3
Explore whether it is possible to override a superclass method that throws an
40 unchecked exception with checked exceptions in the sub-class. K3
Identify the class defined as a superclass for all types of errors and exceptions in
Python.
41 K3
Discuss the correct combination of try, catch, and finally blocks in Python.
42 K3
Explain the use of the printStackTrace() method in Python.
43 K3
Create a Bus child class that inherits from the Vehicle class, incorporating fare
calculations with maintenance charges.
44 K2
Provide examples of checked exceptions in Python.
45 K3
Develop a Python code to create a decorator returning the square of a number.
46 K3
Compare class method and static method, and demonstrate their use with a K3
Python code example.
47
Validate functions such as append(), extend(), pop(), reverse(), remove(), sort(), K3
and insert() of a list in Python.
48
List at least five built-in modules with their functions in Python. K3
49
Write a Python code to generate a random number between 50 to 99 and shuffle a K3
given list1=[21,22,23,24,25].
50
Describe the process of working with images in Tkinter, covering image loading, K3
resizing, and display within a GUI.
51
Explain the concepts of class method and static method decorators with a suitable K3
example in Python.
52
Differentiate between tuples and dictionaries in Python. K3
53
Develop a detailed guide on creating a Tkinter application that includes multiple K3
widgets, emphasizing effective organization and user interaction.
54
Define a lambda function with suitable code in Python. K3
55
Explain the purpose of the sys module in Python. K3
56
Write a code to find the sum of a given list of numbers K3
(list1=[5,6,7,8,9,12,15,18,21]) using the reduce function in Python.
57
COURSEPACK |
FORMAT
Discuss the key features of a Color Picker and its application in enhancing K3
Tkinter interfaces.
58
Elaborate on the role of Container Widgets, with a specific focus on the Frame K3
widget in Tkinter.
59
Demonstrate the use of regular expressions to count the number of vowels in a K3
given string in Python.
60
Self-Learning (it’s a typical course-based project to be carried out by a whole class in groups of four students
each; they should exhibit higher level KLs)
The students, in a group, are expected to conceive an idea based on the content (objectives/outcomes) and
apply the suitable knowledge to demonstrate their learning.
A list of 30-40 project statements can be offered to the students to choose or students can conceive their own
ideas (teamwork), design and develop the product/process/service and implement the same.
COURSEPACK |
FORMAT
SOME SAMPLE PROJECT (Psychomotor skills) (30 Projects*)
To enhance their skill set in the integrated course, the students are advised to execute course-based projects.
Some sample projects are given below:
S.
No. Project Name Description
Build a system to manage employee payroll information including salary calculation,
Employee Payroll deductions, and bonuses. Include features for adding new employees, updating details, and
1
System generating pay-slips.
Create an online quiz platform with multiple-choice questions on various topics. Implement
2 Online Quiz System
features like user registration, quiz-taking, and result display.
Recipe Management Design a system to manage recipes, ingredients, and meal planning. Include features such as
3 adding new recipes, categorizing them, and generating shopping lists.
System
Movie Ticket Develop a system for booking movie tickets online. Include features such as movie
4 selection, seat reservation, and payment processing.
Booking System
Social Media
5
Analysis Tool Create a tool to analyze social media data including trends, sentiments, and user
interactions. Utilize APIs to fetch data from platforms like Twitter or Facebook.
Expense Tracker Build an application for tracking personal expenses and budgeting. Include features for
6
Application adding expenses, categorizing them, and generating reports.
Online Auction Design a system for conducting online auctions. Include features for bidding, auction
7 management, and winner selection.
System
Music Player Develop a music player application with features like playlist creation, shuffle, and repeat.
8 Include support for various audio formats.
Application
Parking Management Build a system for managing parking spaces in a parking lot. Implement features for vehicle
9 entry/exit tracking, fee calculation, and slot availability.
System
Gym Management Design a system to manage gym memberships, schedules, and workout routines. Implement
10 features for member registration, attendance tracking, and progress monitoring.
System
Appointment Build a system for scheduling appointments for services like doctor visits, salon
11 appointments, etc. Include features for appointment booking, reminders, and cancellations.
Scheduling System
Student performance Student performance monitoring system using Python
12 monitoring system
using Python
Develop a simple Tic-Tac-Toe game with a graphical user interface. Include features for
13 Tic-Tac-Toe Game player vs. player and player vs. computer modes.
COURSEPACK |
FORMAT
Build a real-time chat application for communication between multiple users. Implement
14 Chat Application features like private messaging, group chats, and online status indicators.
We have designed an Online Voting System in Python to tackle the existing problem of
elections in various spaces. It is a web-based voting system that will help to manage
elections easily and securely. This voting system can be used for casting votes during
Online Voting elections held in universities and organizations. In this system, the voter does not have to go
15
System Project to the polling booth to cast their vote. They can use their personal computer to do so. The
Python system can be used anywhere. It is not just employed for national elections; it may also be
used for any sort of elections required.
The system comprises 2 modules: User and Admin.
To address the above-mentioned problem, we have developed a College Placement System.
Our system can help to resolve the issue of manual work that makes the process slow and
other problems such as inconsistency and ambiguity in operations. The system intends to
16 College Placement assist college faculties and recruiting companies in analyzing the placement process more
System Using Python efficiently.
The system comprises 3 modules: Students, Placement Department/Admin, and College
Management.
Library Management System Using Python
To tackle this problem, we have designed a Library Management System using Python.
Library management means efficient and effective management of material (information
Library Management
17 sources), machinery, men (human resources), technology, and money to meet the objectives
System
of the library. Our system can help librarians to work easily. This computerization of the
library helps in many instances of its maintenance. It reduces the workload of management
as most of the manual work done is reduced.
Ambulance Booking System using Python
In our Ambulance Booking System, people can easily book an ambulance. There are three
major modules namely User, Ambulance, and Hospital. Users can register and log in using
credentials. Users can edit their profile and change their password in an emergency. Any
Ambulance Booking Upcoming Ambulance Booking details if anyone wants to Book an Ambulance or if there is
18
System an Emergency. For booking an ambulance users have to select ambulance size, pick-up
point & hospital, and date and time. In an emergency will automatically book the nearest
ambulance and hospital. Users will get a list of All the bookings of Ambulances. The front
end involves HTML, CSS, and JavaScript and the back end involves Python. The
framework used is Django and the database is MySQL.
Bulk File Rename/ Image Resize Application
Bulk File Rename/ This is an advanced project which needs you to be well-versed in Machine Learning. We
19
Image Resize will begin by teaching the program how to pre-process data, then perform a few resize and
Application rename images tasks. As the program starts learning, it can handle bulk functions at once.
Weather Monitoring Build a weather monitoring system that collects data from various sensors and displays
20 weather information such as temperature, humidity, and pressure.
System
Real Estate Create a system for managing real estate properties, listings, and inquiries. Implement
21
Management System features for property search, viewing appointments, and contact management.
Working on Mad Libs Generator is one of the finest ways to start exploring hands-on
projects on python for kids. This project is ideal for those who are just getting started with
Generator for Mad software programming. This project will show you how to modify user-inputted data by
22
Libs focusing on Strings, Variables, and Concatenation. The program is set up in such a way that
users will be asked to submit a sequence of inputs that will be used to create a Mad Lib.
Mab lib is a beginner-friendly Python project.
COURSEPACK |
FORMAT
We'll be emulating a rolling dice, as the program's name suggests. This is one of the more
fascinating Python projects since, with each dice roll, it generates a random number. The
user is free to roll the dice as many times as he likes. When the client rolls the dice, the
Dice Rolling application generates random numbers in between 1 and 6. The client will then see the
23
Simulator number displayed. Clients will also be asked if they want to roll the dice again. A function
that may randomly select and print a number between 1 and 6 should also be included in the
programme. This collection of beginner-level Python projects will aid in the development of
a solid foundation in essential programming ideas.
This is a python project that is both entertaining and fascinating and will delight children. In
Python Story a nutshell, the computer Users will be asked for input by the computer such as a place's
24
Generator name, an activity, and so on, and then create a tale based on the information. The plot will
always be the same, with just minor variations in the input.
Working on a YouTube video downloader is one of the finest ways to get started with your
hands-on projects on python for students. Every month, about a billion people watch
YouTube Video YouTube. On occasion, we enjoy downloading videos endlessly. Although YouTube does
25
Downloader- not offer this feature, you can make a simple app with a user interface that allows you to
download videos on YouTube in a variety of formats and quality levels. This project
appears complicated at first, but it becomes simple once you get started.
The focus of this name is on the user guessing the randomly produced word. You can make
a list of words from which the word must be selected, as well as a limit on the number of
guesses that can be made. After that, you're free to make your own rules! When the user
26 What’s the word?
submits the word, you can specify whether or not the letter written in this location appears.
You'll need a function that detects whether the user is typing letters or numbers and displays
appropriate error messages if so.
Build a simple dictionary application that fetches word definitions and synonyms from an
Dictionary App online dictionary API. A Dictionary App based project in Python is a useful program that
27
allows users to look up the meanings, definitions, translations, and related information of
words or phrases.
Build a program that translates text from one language to another using a translation API. A
Language Translator project using Python is an application that allows users to input text in
Language Translator one language and receive a translation of that text into another language of their choice.
28
This project typically involves the integration of translation APIs or libraries to perform the
actual translation.
Develop a basic e-commerce shopping cart system where users can add, remove, and
purchase items. Remember that the complexity of these projects can vary depending on
E-commerce Cart your skill level, and you can always add more features and polish to make them more
29
advanced if you'd like. Additionally, these projects can serve as excellent portfolio pieces or
practice to enhance your Python programming skills.
Build a system for scheduling appointments for services like doctor visits, salon
Appointment appointments, etc. Include features for appointment booking, reminders, and cancellations.
30
Scheduling System
COURSEPACK |
FORMAT