Results 1 to 5 of 5

Thread: C++ :)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Jan:2009
    Location:
    Posts: 16

    C++ :)

    , :

    Exercise P10.3. Enhance the Employee class to include a pointer to a BankAccount. Read
    in employees and their salaries. Store them in a vector<Employee>. For each employee,
    allocate a new bank account on the heap, except that two consecutive employees with the
    same last name should share the same account. Then traverse the vector of employees
    and, for each employee, deposit 1/12th of their annual salary into their bank account.
    Afterwards, print all employee names and account balances.

    Exercise P10.4. Enhance the preceding exercise to delete all bank account objects. Make
    sure that no object gets deleted twice.

    10.3, , ... 10.3. , error- 10.4!

    !!!


    !

    10.3 10.4
    Attached Files
    Last edited by hskiller; 5th April 2011 at 17:26.

  2. #2
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,449
    : using namespace std; #include-.
    . , , , .

    10.4 , , ( , ). , .
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  3. #3
    Registered User
    Join Date: Jan:2009
    Location:
    Posts: 16
    , ... !

  4. #4
    ɐ-əpoɔᴉu⋂ ɐ ə anrieff's Avatar
    Join Date: Apr:2004
    Location: Sofia
    Posts: 8,449
    10.4 - .
    , . .
    "640K ught to be enough for anybody" - Bill Gates, 1981
    ::Machine specs::Fract::AGG::::Baileys::blog::YouTube channel

  5. #5
    Registered User
    Join Date: Jan:2009
    Location:
    Posts: 16
    ! , !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |