OOP Concepts - 101 Computing https://www.101computing.net Boost Your Programming Skills! Thu, 15 Aug 2024 21:33:29 +0000 en-US hourly 1 https://www.101computing.net/wp/wp-content/uploads/cropped-android-chrome-512x512-1-32x32.png OOP Concepts - 101 Computing https://www.101computing.net 32 32 Snake Game Using Python https://www.101computing.net/snake-game-using-python/ Thu, 21 Mar 2024 15:58:08 +0000 https://www.101computing.net/?p=19880 In this Python programming challenge, we are going to revisit the classic game called Snake. In this game, the player controls a snake using the arrow keys of the keyboard. The snake can go in all four directions (up, down,

The post Snake Game Using Python first appeared on 101 Computing.

]]>
OOP – Inheritance – Q&A https://www.101computing.net/oop-inheritance-qa/ Sun, 13 Mar 2022 16:39:14 +0000 https://www.101computing.net/?p=13789 Question 1[2 marks] Class File:​ private filename​ //Constructor for the File class procedure new(strFilename):​ filename = strFilename​ public procedure rename(strFilename)​ if strfilename!="":​ filename = strFilename​ Class MP3 inherits File:​ private title​ private artist​ private duration​ //Constructor for the MP3 class

The post OOP – Inheritance – Q&A first appeared on 101 Computing.

]]>
OOP – Encapsulation – Q&A https://www.101computing.net/oop-encapsulation-qa/ Sun, 13 Mar 2022 16:23:16 +0000 https://www.101computing.net/?p=13732 Question 1[2 marks] class Padlock: private key private locked //Constructor for the Padlock class: procedure new(str_key,bool_locked): key = str_key locked = bool_locked public function unlock(combination): if combination==key: locked = False return True else: return False public procedure lock(): locked =

The post OOP – Encapsulation – Q&A first appeared on 101 Computing.

]]>
Binary Search Tree Implementation https://www.101computing.net/binary-search-tree-implementation/ Thu, 04 Mar 2021 20:35:59 +0000 https://www.101computing.net/?p=12292 Binary Search Trees are an effective solution to store data in a computer program and perform a binary search. The benefits of using a BST (Binary Search Tree) data structure is that data can be added to the tree as

The post Binary Search Tree Implementation first appeared on 101 Computing.

]]>
Multimedia Library (OOP Concepts) https://www.101computing.net/multimedia-library-oop-concepts/ Thu, 28 Jan 2021 12:22:11 +0000 https://www.101computing.net/?p=12000 In this blog post, we will write a computer program to create and maintain a multimedia library of books, CDs and DVDs. The aim of this programming task is to demonstrate some key Object-Oriented Programming concepts such as: Creating Classes

The post Multimedia Library (OOP Concepts) first appeared on 101 Computing.

]]>
MP3 Playlist Class https://www.101computing.net/mp3-playlist-class/ Wed, 27 Jan 2021 11:08:57 +0000 https://www.101computing.net/?p=11976 The aim of this challenge is to implement a Class in Python to maintain an MP3 Playlist. This class could be used when developing the software for a music App on a smartphone or an mp3 player. This MP3 playlist

The post MP3 Playlist Class first appeared on 101 Computing.

]]>
Shopping Basket Class https://www.101computing.net/shopping-basket-class/ Tue, 26 Jan 2021 19:38:10 +0000 https://www.101computing.net/?p=11968 One of the key features of any e-commerce website is the shopping basket. It is used to let the end-users add products to their basket before proceeding to checkout. In this Python challenge we will create a Shopping Basket class

The post Shopping Basket Class first appeared on 101 Computing.

]]>
DOS Emulator using Python https://www.101computing.net/dos-emulator-using-python/ Fri, 22 Jan 2021 15:24:11 +0000 https://www.101computing.net/?p=11911 In the 1980’s, when IBM introduced the IBM PC which was built with the Intel 8088 microprocessor, they needed an operating system. They approached Microsoft who provided IBM with the “Microsoft Disk Operating System”: MS-DOS. A Disk Operating System is

The post DOS Emulator using Python first appeared on 101 Computing.

]]>
OOP Programming: Classes & Objects https://www.101computing.net/oop-programming/ Sat, 16 Jan 2021 22:16:02 +0000 https://www.101computing.net/?p=11845 In this blog post we will investigate how to create some basic classes and objects that could be used in a range of programming projects. Classes and Objects are the building blocks of Object-Oriented programs. You can find out about

The post OOP Programming: Classes & Objects first appeared on 101 Computing.

]]>
Stopwatch Class (JavaScript) https://www.101computing.net/stopwatch-class-javascript/ Sun, 27 Dec 2020 19:30:21 +0000 https://www.101computing.net/?p=11648 In this challenge we will create an interactive stopwatch using HTML, CSS and JavaScript. The aim of this blog post is to use Object Oriented Programming to create our own Stopwatch class. Step 1: Stopwatch Class and its constructor First

The post Stopwatch Class (JavaScript) first appeared on 101 Computing.

]]>