Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS304 Object Oriented Programming Assignment 02 Fall 2014 Due Date: Dec 08, 2014
#1


CS304 Object Oriented Programming Assignment 02 Solution and Discussion Fall 2014 Due Date: Dec 08, 2014



Objective:



The objective of this assignment is to provide hands on experience of:



Relationships among classes
Constructors
Constructor overloading
Getter and Setter functions
Guidelines:



Code should be properly indented and well commented.
Follow C/C++ guide lines while writing variable names, function names etc
Use only dev-C++ for this assignment.


Assignment


Problem Statement:

[ATTACH=CONFIG]24271[/ATTACH]

ccount()
Default constructor for account class, setting account balance to 0, Account number to 1, branch name to NULL and branch code to 0
Account(float, int, char *, int)
It will take balance, account no, bank name and branch code as arguments and set their values accordingly
withdraw(float)
This will subtract amount from the balance of account that will be passed as its parameter.

If the amount being withdrawn is greater the balance of the account , it will display the message “Insufficient balance”
deposit(float)
Function will add amount to the balance of account. Amount will be passed as its parameter.
getBalance()
This function will return the value of available balance
getAccountNo()
This function will return the account number
getBankName()
This function will return the name of bank
getBrachCode()
This function will return branch code of bank
Customer class has the following data members:

Customer Name
Address
Account object


Customer class must have the following member functions:


[ATTACH=CONFIG]24272[/ATTACH]

Within main() function, objects of both classes will be created , and respective member functions of these objects will be called.



First of all create an object of Account class by passing balance, account number, bank name and branch code. Then create an object of customer class by passing Account object, name and address. Now call display() function which will display all the values of Customer including his/her name, address and account detail.



The program should prompt the user to enter a value and call deposit() function passing it entered value. Then call the display() function.



After this, the program should prompt the user to enter a value and call withdraw() function passing it entered value. Then call the display() function.



Sample output of the program:

[ATTACH=CONFIG]24273[/ATTACH]






Attached Files
.jpg   m.jpg (Size: 37.03 KB / Downloads: 244)
.jpg   Untitled.jpg (Size: 27.2 KB / Downloads: 225)
.jpg   s2 (1).jpg (Size: 145.91 KB / Downloads: 236)

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cs403 Assignment 3 Helping material May 8,2010 viki 1 5,204 04-28-2020, 03:19 PM
Last Post: ClaireBeauc
  cs301 assignment no 3 Solution 20 January 2016 Vuhelper 0 11,089 01-20-2016, 03:32 PM
Last Post: Vuhelper
  CS201 Assignment vo 3 Solution 20th January 2016 Vuhelper 2 2,597 01-20-2016, 03:28 PM
Last Post: Vuhelper
  CS101 Assignment no 3 Solution 20th January 2016 Vuhelper 0 2,279 01-20-2016, 03:25 PM
Last Post: Vuhelper
  SOC101 INTRODUCTION TO SOCIOLOGY assignment no 3 Solution 20 January 2016 Vuhelper 0 1,869 01-20-2016, 03:19 PM
Last Post: Vuhelper
  CS402 Assignment No 4 Solution & Discussion Xpert 0 2,099 08-01-2015, 02:33 AM
Last Post: Xpert
  cs101 Assignment No. 1 Solution 21 may spring 2015 semester Xpert 0 2,909 05-21-2015, 12:41 AM
Last Post: Xpert
  Assignment solution eng 301 due date 20 may 2015 rumesa khan 3 4,531 05-20-2015, 01:34 AM
Last Post: Xpert
  PHY301 Circuit Theory Assignment No. 1 idea Solution spring may 2015 semester Xpert 0 1,558 05-15-2015, 03:52 AM
Last Post: Xpert
  Assignment No. 01 Spring 2015 Information Systems CS507 idea solution spring 2015 Xpert 0 2,447 05-15-2015, 03:49 AM
Last Post: Xpert

Forum Jump:


Users browsing this thread: 1 Guest(s)