Showing posts with label class. Show all posts
Showing posts with label class. Show all posts

Monday, January 1, 2018

Write a program in C++ to define the class bank shown below. Create an array of n objects and display the objects' details.

Aim : Write a program in C++ to define the class bank shown below. Create an array of n objects and display the objects' details.

class bank { 
private :
    Accno integer.
    Name character 20
    Acctype character 1 ('s','c') use enum
    Balance float
Public:
    Initial();
    Deposit();
    Withdrawl();
    Balance();
    Display();

}

CODE:

OUTPUT:


Write a program in C++ to define the class worker shown below. Create an array of n objects and display the objects' details.

Aim : Write a program in C++ to define the class worker shown below

class worker ( 
private :
      Wname character (20),
      Wno integer,
      Wgrate float,
      Hourlywagerate float,
      Totwage float,
      Calcwage(hrwg,wgrate)
public :
      Worker();
      Indata();
      Outdata();
)

CODE:

OUTPUT: