TYBCS PHP Assignment 4

Set A 

Q: 1) Define an interface which has methods area( ), volume( ). Define constant PI. Create a class cylinder which implements this interface and calculate area and volume. (Hint: Use define( )) 

Q: 2) Write class declarations and member function definitions for an employee(code, name, designation). Derive emp_account(account_no, joining_date) from employee and emp_sal(basic_pay, earnings, deduction) from emp_account. Write a menu driven program 
        a) To build a master table 
        b) To sort all entries 
        c) To search an entry 
        d) Display salary

Set B 

Q:1) Create class rectangle and derive a class square from class Rectangle. Create another class circle. Create an interface with only one method called area(). Implement this interface in all the classes. Include appropriate data members and constructors in all classes. Write a program to accept details of a square, circle and rectangle and display the area. 

Q:2) Create a class account(accno,cust_name). Derive two classes from account as saving_acc(balance, min_amount) and current_acc(balance, min_amount). 
        a) Display a menu
        b) Saving Account 
        c) Current Account For each of this display a menu with the following options. 1. Create         account 2. Deposit 3. Withdrawal 

Set C 

Q:1) Define an interface for stack operation. Implement this interface in a class. 

Q:2) Write necessary class and member function definitions for a cricket player object. The program should accept details from user (max :10) (player_code, name, runs, innings_played, no_of_times_out). The program should contain following menu. Enter details of players. Display average runs of a single player. Average runs of all players. Display the list of players in sorted order as per runs(use function overloading)

Post a Comment

9 Comments

  1. please give the solution for remaining programmes

    ReplyDelete
  2. Can you please give solutions of this program
    Q: 2) Write class declarations and member function definitions for an employee(code, name, designation). Derive emp_account(account_no, joining_date) from employee and emp_sal(basic_pay, earnings, deduction) from emp_account. Write a menu driven program
    a) To build a master table
    b) To sort all entries
    c) To search an entry
    d) Display salary

    ReplyDelete
  3. can you give solutions of this programs
    Q: 2) Write class declarations and member function definitions for an employee(code, name, designation). Derive emp_account(account_no, joining_date) from employee and emp_sal(basic_pay, earnings, deduction) from emp_account. Write a menu driven program
    a) To build a master table
    b) To sort all entries
    c) To search an entry
    d) Display salary

    ReplyDelete
  4. are you fucking see our comments or not?

    ReplyDelete
  5. except setA1, no other program is accessible

    ReplyDelete
  6. account(accno,cust_name). Derive two classes from account as saving_acc(balance, min_amount) and current_acc(balance, min_amount).
    a) Display a menu
    b) Saving Account
    c) Current Account For each of this display a menu with the following options. 1. Create account 2. Deposit 3. Withdrawal

    ReplyDelete
  7. Write PHP Script to create a class account (accno,cust_name). Derive two classes from account as saving_acc(balance, min_amount) and current_acc(balance, min_amount). Display a menu a) Saving Account b) Current Account For each of this display a menu with the following options. 1. Create account 2. Deposit 3. Withdrawal

    ReplyDelete