March 2, 2012

Practically implementing Object oriented concepts using c++

Practically implementing Object oriented concepts using c++ (Download Code) #include #include #include “mc100200752_CS304_5.h” //mc100200752 //START – DEFINITION OF administrator FUNCTIONS bool administrator::login() { //we will compare this id with our library DBMS records //if user exists then is_login = true; return is_login; }; bool administrator::logoff(int id) { }; int administrator::search() { }; int administrator::Return() { […]

C++ Implementation, simple association, composition, aggregation

C++ Implementation, simple association, composition, aggregation 1. Simple Association: It can be implemented by sending messages from one object to another as this type of association does not involve any type of containment. 2. Composition: Composition is achieved by adding declaration of object of one class in other object. 3. Aggregation: Aggregation is implemented by […]

The concept of composition in OOP, Inheritance, Public & private inheritance, basic constructs of OOP in a program

The concept of composition in OOP, Inheritance, Public & private inheritance, basic constructs of OOP in a program A C++ Program in which you will learn to write a class ‘Pakistani Citizens’ which has five data members “name, age, CNIC No, province, and domicile” and two data functions getter and setter for each data member […]

Digital Library Management System

Explanation of OOP basics with the help of Digital Library Management System Problem: The purpose of the Library Management system is to allow for storing details of a large number of books, magazines, Journals, thesis and allow for add, search, borrow, return facilities separately to administrator/Librarian, staff and students. Different privileges are given to different […]

C Language File Include Example and Minimum Element Search Function from an Array

#include <cstdlib> #include <iostream> using namespace std; #include “header.h” int main(int argc, char *argv[]) { cout << “Roll No. mc100200752\n\nAssignment: CS301 – 4\n\n”; cout << “Question:\nWrite a program in c++ that takes any no”; cout << ” of elements through command prompt from”; cout << “user and saves it in an array. Then convert it […]

March 1, 2012

Stack

Stack A limitation; we have to access the last stack element first from stack (LIFO). IsEmpty() used to check either stack is emptied while using pop() or we use exception to handle this situation. If we want to use array inside, we have to shift the elements left to access/insert/delete a specific element in stack. […]

Link List

Link List Its usage provide faster program than usage of array. We use link list instead of array especially when we want to avoid the condition where array will be filled inside stack. Link list facilitate us to move further or backward. In doubly link list we have facility to move next and previous. In […]

Arrays

Characteristics of Arrays With array we can run push and pop fastest by deciding where to inert and where to delete an element in array. We can use add(), remove() functions to add an element to array inside the list and remove respectively from the current position. Add() moves the elements to right and place […]