Wisdom Lighter

Advertisement

Monday, 14 January 2019

The Greatest Gift Of Life Is FriendShip


Friendship is a relationship of mutual affection between people.[1] Friendship is a stronger form of interpersonal bond than an association. Friendship has been studied in academic fields such as communicationsociologysocial psychologyanthropology, and philosophy. Various academic theories of friendship have been proposed, including social exchange theoryequity theoryrelational dialectics, and attachment styles.


Although there are many forms of friendship, some of which may vary from place to place, certain characteristics are present in many types of such bonds. Such characteristics include affection; kindnesslovevirtuesympathyempathyhonestyaltruismloyalty, mutual understanding and compassion, enjoyment of each other's company, trust, and the ability to be oneself, express one's feelings to others, and make mistakes without fear of judgment from the friend.

Sunday, 1 July 2018

C++ Program Operations On Odd Input Number By The User

When the user enters an odd number, program changes its value to 3 times the entered number plus 1. Otherwise, changes its value to half of the number entered.

C++ Program Takes Input From User, Prints Sum If User Enters 1

Calculates sum of the values entered by the user.

A C++ Program to Check For Even Or Odd Number

Takes input from the user, and checks whether the number entered is even or odd.

C++ Program Results in Corresponding Output Based on User Input



Write a program to get input a number, lets say your age form keyboard and check it. 
Condition                                                                Message
age is less than 50                                       "You are pretty young!"
age is equal to 50                                            "You are old"
age is greater than 50                                   "You are really old"'

Wednesday, 20 June 2018

Visual Basic And Object Oriented Programming



     Object oriented programming approach differs in many ways as opposed to procedural programming techniques. Object oriented programming had an immense effect on the ways programs were written using structured programming approach previously. While, object oriented programming had many advantages, therefore computer programmers shifted to object oriented programming techniques. Procedural programming had difficulty to handle the problems which dealt with objects in the real world applications, e.g. humans, houses, plants, etc. According to Lafore “problem with the procedural paradigm is that its arrangement of separate data and functions does a poor job of modeling things in the real world,” (p. 13). Here is where object oriented programming comes into play.

 Object oriented programming techniques provided a better way to programmer in writing program codes based on objects. It made programming far better and easier to understand. Object oriented programming deals and focuses on problem being solved rather than focusing on the way data items are stored in the computer memory. In my opinion, object oriented programming proved advantageous. Software companies have huge demands for people who have strong object oriented programming skills. That’s why object oriented programming has become tremendously popular in the recent years.

 Object oriented programming has influenced me significantly. I started learning object oriented programming in C++ as my mother language in university. Before learning object oriented programming, it was a pre-requisite to have sound understanding of structured programming techniques in C++. It became very easier for me to write codes based on objects. These programming techniques required sound understanding of classes, objects, inheritance, polymorphism, etc. which made object oriented programming convenient.

Visual basic programming language is basically designed for developing GUI (graphical user interface) system programs. It took a week or so to learn programming syntax of visual basic, as I had previous programming experience. The buttons and labels in visual basic studio were easily made on forms and functionality was easily incorporated into those buttons using VB programming language. The overall syntax of VB was quite different to C, C++, etc. However, some syntax like operators and if statements were similar. Moreover, MS visual studio also incorporates Context-sensitive help. The Context-Sensitive Help is assistance from MSDN. It helps in terms of programming syntax when you are using VB in MS visual studio, move your cursor to a built-in function on the screen and click F1. You will be automatically taken to MSDN website for help. When you add a button to form, open properties dialog box of button, point show help on a help-provider to true. Now as you click the button you will be referred to website. You can also visit www.msdn.com library on VB to learn about VB programming functions. The authentic website of Microsoft provides a sound understanding of basic functionality of functions in visual basic.

 Microsoft has also introduced .NET frameworks, which are used to build applications primarily for windows platforms. Visual basic.net was a very powerful language introduced by Microsoft which embedded the techniques of object oriented programming. As C sharp is very powerful language, people now a day tend to learn C# more than visual basic.net. In my opinion, visual basis.net is going to fade away over the coming years due to high level languages which provide a better and easier way to write codes and develop quality applications.








References
Lafore, R. (2002). Object oriented programming in C++, fourth edition. Indiana, USA. : Sams Publishing.

Thursday, 14 June 2018

Bank Management System Project in C++

Data Structure And Algorithm


Develop a Bank Management System, Using any form of Data structure.


Use Case Diagram Of Hospital In Rational Rose


Software Engineering

How to find product of a number in C++

How to calculate a product of a number using integers in C++.

Software Requirement Specification (SRS) Document


Student Result Management System

Tuesday, 22 May 2018

How To Design A Payroll System Of An Employee Using Single Inheritance




Q. You have to design a payroll system of an employee using single inheritance Create a base class employee which contain the
         Name
         Employee number
         Designation
Of employee by using get function.
Create a subclass salary which contains basic pay, Human Resource Allowance, Medical allowance and Profitability Fund by using get_data2 ().Net pay should calculated in a function calculation ().Provide a display function to display all data of employee.
Program should be enough dynamic it provide the facility to user to enter the no record of Employee which he or she desires?

Program

#include<iostream>
#include<conio.h>

using namespace std;
class employee
{
          public:
                   string name,des;
                   intnum;
                  
                             void get_data()
                             {
                                      cout<<"enter your name"<<endl;
                             getline(cin,name);
                                      cout<<"enter designation"<<endl;
                                      getline(cin,des);
                                      cout<<"enter employee number"<<endl;
                                      cin>>num;
                             }
};
class salary: public employee
{
          private:
                   int bpay,ma,hra,pf,w,x,y,z;
                   public:
                             void get_data()
                            
                 {
                  
                                      cout<<"enter basic pay"<<endl;
                                      cin>>bpay;
                                      cout<<"enter human resource allowance"<<endl;
                                      cin>>hra;
                                      cout<<"enter profitability fund"<<endl;
                                      cin>>pf;
                                       calculate();
                                      func();
                             }
              void calculate()
              {
                   x=bpay-hra;
                   cout<<"after calculating basic pay alllowance"<<x<<endl;
                   y=bpay-ma;
                   cout<<"after calculating medecial allowance"<<y<<endl;
                   z=bpay-pf;
                   cout<<"after calculating prfitability fund"<<z<<endl;
                   w=hra+ma+pf;
                  
                                                }       
         
          intfunc()
                   {
                             int p;
                             cout<<"do you want to run again if yes the press 1 else press 0";
                             cin>>p;
                             if(p==1)
                             {
                                      get_data();
                             }
                                      else
                                      {
                                                return 0;
                                      }                           
                             }
                  
};
intmain()
{
          salary s1;
          s1.get_data();
          return 0;
}



Object Oriented Programming In C++, Class Creation


Create a base/parent class name student. It has one data members of integer type and one of char type. All the data members should be public.
           Name
          Roll number
Provide a get_data( ) function to get data from user. Create a subclass marks which contain marks of at least three subjects from user by using get_marks (). In get_marks () firstly you have to call inherited function get_data( ) of parent class. You are also required to calculated percentage of marks in get_marks ().  Provide a display function to display all data of a student. You have to access all the functions in a main by using single object of class.
Program should be enough dynamic it provide the facility to user to enter the no record of students which he or she desires?




Program
#include<iostream>
#include<conio.h>
using namespace std;
class student
{
          public:
                   char name[10];
                   introllno;
                   void get_data()
                   {
                             cout<<"enter your name"<<endl;
                             cin>>name;
                             cout<<"enter your roll no"<<endl;
                             cin>>rollno;
                   }
};
class marks:public student
{
          public:
                   float m1,m2,m3,sum,pre;
                   void get_data()
                   {

                             cout<<"enter the marks of oop"<<endl;
                             cin>>m1;
                             cout<<"enter the marks of maths"<<endl;
                             cin>>m2;
                             cout<<"enter the marks of ds"<<endl;
                             cin>>m3;
                             sum=m1+m2+m3;
                             cout<<"the total marks"<<"  "<<sum<<endl;
                             pre=(sum/300)*100;
                             cout<<"the percentage is"<<"  "<<pre;
                             func();
                   }
                   func()
                   {
                             int p;
                             cout<<"do you want to run the program if yes then press 1 else press 0="<<endl;
                             cin>>p;
                             if (p==1)
                             {
                                      get_data();
                             }
                             else
                             {
                                      return 0;
                             }
                   }
         
};
intmain()
{
          marks A1;
          student A2;
          A1.get_data();
          return 0;
}



C++ Fundamentals Practice Questions 5




Fundamentals of programming

Q1:

Write a program to mimic a calculator. Input two int numbers and state whether
the numbers are to be added, subtracted, multiplied or divided. Cater for the possibility
of denominator being zero in the division two numbers
Use type casting in case of division.

Q2:

A bicycle shop in Hyannis rents bicycles by the day at different rates throughout the year,
according to the season (see table below).The proprietor also gives a 25% discount if the
rental period is greater than 7 days. Renters must also pay a 50$ returnable deposit for each bicycle rented.
Write a program to input the season and the number of days of rental and then calculate and display the total charge that includes the deposit. (Use if-else if statement Or switch statement)

  
Season
Charge
S[spring]
$5.00
M[Summer] 
$7.50
A[Autumn] 
$3.75
W[Winter] 
$2.75




C++ Fundamental Programming Questions 4


Fundamentals of programming


Question 1:

Write an algorithm and then a C++ program that asks the user to enter temperature of type double and if the temperature entered is greater than the normal temperature (given by the programmer) then the program must calculate the degrees of fever by subtracting normal temperature from the temperature given by user.

Question 2:

Draw the flow Chart on a paper before writing program.
Write a complete C++ program of the following illustrations.

A user purchased certain items; if the items purchased are greater than zero then average cost of the item will be calculated and displayed with appropriate message otherwise appropriate error message must be displayed.
The program will contain three variables num_Items, average_Cost and
total_Cost of type integer and real respectively. Assign appropriate values to num_Items and total_Cost and then perform the task given above.

Question3:

What is wrong with the following if statement (there are at least 3 errors). The indentation indicates the desired behavior. (Check it either manually or by writing the whole code in a C++ source file in a complete C++ program)

if numNeighbors >= 3 || numNeighbors = 4
++numNeighbors;
cout << "You are dead!" << endl;
else
--numNeighbors;

Question4:

Write if statements to do the following:

Ø  If character variable tax Code is ’T’, increase price by adding the taxRate per-centage of price to it.

Ø  If integer variable opCode has the value 1, read in or input double values for X and Y and
      calculate and print their sum.

Ø  If integer variable test is even or odd.

Ø  If integer variable current Number is odd, change its value so that it is now 3
       times currentNumber plus 1, otherwise change its value so that it is now half of
       currentNumber

Ø  If integer variable Number is multiple of 3 or not

Ø  Assign 1 to the integer variable leapyYear if the integer variable year is a
       leap year. (A leap year is a multiple of 4, and if it is a multiple of 100, it must
      also be a multiple of 400.)

Ø  Assign a value to double variable cost depending on the value of integer variable
      distance as follows:
       Distance                                                 Cost
----------------------------------- ------------------
0 through 100                                          5.00
More than 100 but not more than 500    8.00
More than 500 but less than 1,000         10.00
1,000 or more                                         12.00