We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

1 assignment soulation file

#include <iostream>
#include <stdlib.h>

using namespace std;
//starting the student class
class Student {

private:
    char * StudentID;
    char * StudentName;

public:
    Student(char *, char *);
    void print(); //parametarized constructor of student class
    ~Student(); //destructor of student class

};

Student::Student(char *id, char *name) {
    StudentID = id;
    StudentName = name;
}

void Student::print() {
    cout "Student ID :" StudentID endl;
    cout "Student Name :" StudentName "\n\n";
}

Student::~Student() {

}

class Instructor{
private:
    float age[8];

public:
    Instructor(){ }
    ~Instructor(){ }
    void input();
    void print();
};

void Instructor::input() {
    
    int i;
    
    for(i=1; i<=8; i++) {
    cout "Please enter the age of " i " Instructor in Feet : ";
    cin >> age[i];
    cout "\n\n";
    }
}

void Instructor::print() {
    int i;
    float totalage = 0, averageage = 0;
    
    for(i=1; i<=8; i++) {
        totalage+=age[i];
    }
    averageage = totalage/8;
    cout "Average Height in Feet : " averageage;
}


int main() {
    
    Student student1((char *)"mc000000", (char *)"XYZ");
    student1.print();
    
    Instructor heights;
    heights.input();
    heights.print();
    
    cout "\n\n";
    
system("pause");
}

2nd assign  soluation:


#include <iostream>
#include <stdlib.h>
using namespace std;

// Account Class Declaration and Definition
class account
{
      private:
              int accountNo;
              float balance;
              string bankName;
              int b_code;
      public:
             account()
             {
                       // Default Constructor
                   accountNo=00;
                   balance=0.0;
                   bankName="Default";
                   b_code=00;     
             }
              // End of Default Constructor
             
             account(int ac_num, float bal, string b_name, int code)
             {
                          // Parametarized Constructor
                   accountNo=ac_num;
                   balance=bal;
                   bankName=b_name;
                   b_code= code;
             }
               // End Parametarized Constructor
             
             void withdraw(float draw_money)
             {
                   // WithDrawl Func
                   if (balance<draw_money){
                   cout "\n\a \"Insufficient balance.......\"";                        
                   }
                   else
                   {
                   balance-=draw_money;
                   }
             }
             // End of WithDrawl Func
             
             void deposit(float add_money)
             {
                   // Deposit Func
                   balance+=add_money;                  
             }
             // And other some self explanatory Function of Account Class
             float getBalance()
             {
                   return balance;
             }
             int getAccountNo()
             {
                   return accountNo;    
             }
             string getBankName()
             {
                   return bankName;       
             }
             int getBrachCode()
             {
                   return b_code;  
             }          
};
 // End of Account Class

class customer
{
      private:
              string name;
              string address;              
      public:
             account ac; // public because it is represented as public in class diagram
             customer(string n, string a, account acc){ // Parametarized Constructor
             name= n;
             address=a;
             ac=acc;
             }
             // End of Parametarized Constructor
             
             void display()
             {
                 cout "\n Customer Name: "name;
                 cout "\n Customer Address: "address;
                 cout "\n Bank Name: "ac.getBankName();
                 cout "\n Branch Code: "ac.getBrachCode();
                 cout "\n Current Balance: "ac.getBalance();
                 cout "\n Account No. "ac.getAccountNo();  
             }
      };
       // End of Customer Class
      
main()
{
       cout "..........Displaying Customer Account Information........."endlendl;
       account myaccount(7876, 40100, "Habib Bank", 123); // Creating an account Obj
       customer DD("XYZ", "Programming Island", myaccount); // Creating an customer Obj
       DD.display();
       
       float dep, draw;
       cout "\n\n Please Enter a value for Deposit: ";
       cin >> dep;
       DD.ac.deposit(dep);
       cout "\n\n Current Balance after Depositing...";
       DD.display();
       
       cout "\n\n Please Enter a value for Withdrawl: ";
       cin >> draw;
       DD.ac.withdraw(draw);
        cout "\n\n Current Balance after withdrawing...";
       DD.display();       

 cout endlendl;      
system("pause");       
}

3rd Assignment solutaion files:

#include <iostream>
using namespace std;
class Account
{
        protected:
int account_no;
int balance;
char *bank_name;
int branch_code;
int rate_of_interest;

        public:
Account(int v , int w , char *x , int y , int z)
{
account_no = v;
balance = w;
bank_name = x;
branch_code = y;
rate_of_interest = z;
}
void setBlance(int bln)
{
balance = bln;
}

int getBalance()
{
return balance;
}
int getInterRate()
{
return rate_of_interest;
}
virtual void calcProfit() = 0;

};

class currentAccount : public Account
{
              
                public:
currentAccount(int v , int w , char *x , int y , int z =0):Account(v,w,x,y,z)
{

}
void calcProfit()
{
int pro = (balance*rate_of_interest)/100;
int Balance = balance + pro;
cout"Profit: 0 Balance: "Balanceendl;
}
};

class savingAccount : public Account
{
public :
savingAccount(int v , int w , char *x , int y , int z ):Account(v,w,x,y,z)
{

}
void calcProfit()
{
int pro = (balance*rate_of_interest)/100;
int Balance = balance + pro;
cout"Profit: "balance" Balance before profit "balance" Balance after profit "Balanceendl;
}
} ;
main ()
{

currentAccount a(01, 10000, "UBL", 123);
currentAccount b(01, 15000, "HBL", 111);
savingAccount c(02, 15000, "HBL", 111, 10) ;
savingAccount d(02, 10000, "UBL", 123, 15);
currentAccount e(03, 25000, "HBL", 111);

Account *obj[5];

obj[0] = &a;
obj[1] = &b;
obj[2] = &c;
obj[3] = &d;
obj[4] = &e;
for(int i = 0 ; i< 5; i++)
{
obj[i]->calcProfit();
   coutendl;
}
  coutendl;
 system("pause");
}

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 383

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

there is some more things

Attachments:

file without error

Attachments:

midterm material

Attachments:

good job Pari. thanks for sharing

RSS

Latest Activity

+ ! ! ! ! ! ! ! ! ! AG replied to + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion Happy Birth Day Zargiyah (Tasha <3)
6 minutes ago
+ Danial liked + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion Happy Birth Day Zargiyah (Tasha <3)
12 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Muhammad Younas Rajpoot's discussion ECO404 assignment 1 fall semester dated 19-11-2019
12 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked waqas ahmad's discussion isl 201
12 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked zobialatif's discussion hazrat ali says
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + IUUOƆƎUT +'s discussion Kabhi aye haqeeqat e muntizir
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Abdul Majid Jamil's discussion for assignment of zoogy on topic wildlife counting
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Azhar Sagar's discussion How to make srs Software Requirements Specification
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Moji's discussion MCM301 assignment no 1
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked Aijaz khan's discussion CS608 - Software Verification and Validation Assignment No. 2 Need Solution
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked 彡JK彡 ❤️'s discussion If you have sOmething stupid to saY............
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked zohaib iftikhar's discussion ...* NASEEB TAK RASAI ...*
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked 彡JK彡 ❤️'s discussion Don't Look for Perfection........ LOVE lies in imperfection
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked +! ! ! "Asнтαℓғαн's discussion Happy wala Birthday tashy patashy ❤ (Tasha)
13 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + ! ! ! ! ! ! ! ! ! ! ! ! ! ! !'s discussion Happy Birth Day Zargiyah (Tasha <3)
14 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + IUUOƆƎUT +'s discussion کہو تو لوٹ جاتے ہیں ۔ ۔ ۔
14 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + IUUOƆƎUT +'s discussion How Can You Get Secured of Being Banned On Ning
14 minutes ago
Danial added a discussion to the group MCM501 Advertising for Print and Electronic Media
36 minutes ago
Zareen replied to + IUUOƆƎUT +'s discussion How Can You Get Secured of Being Banned On Ning
38 minutes ago
khurram us salam replied to + M.Tariq Malik's discussion ACC501 GDB Fall 2019 Solution & Discussion in the group ACC501 Business Finance
39 minutes ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service