Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Writing Class definitions

Writing Class definitions

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialsaleshelpquestionlearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bhangie
    wrote on last edited by
    #1

    Hi there Can someone help me with this? I need to write a program which simulates a computer system in a public library. Working on these four objects - Customer, Books and loans and the library itself. The library needs to collect info about Customer and add customers. Books title, isdn number and so forth. Loans = the date loaned and date returned. Customers must be able to loan books from and return books to the library. Library needs to print out a report containg details of each book and customer for each loan. I would apreciate if some can just give me a starting point example of how to implement this. Also links to places where i can go thru similar code thanks in advance Bhangie

    S 1 Reply Last reply
    0
    • B bhangie

      Hi there Can someone help me with this? I need to write a program which simulates a computer system in a public library. Working on these four objects - Customer, Books and loans and the library itself. The library needs to collect info about Customer and add customers. Books title, isdn number and so forth. Loans = the date loaned and date returned. Customers must be able to loan books from and return books to the library. Library needs to print out a report containg details of each book and customer for each loan. I would apreciate if some can just give me a starting point example of how to implement this. Also links to places where i can go thru similar code thanks in advance Bhangie

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      It's been a while since I did homework. Here are some hints for my version. Each object should encapsulate the data about the instance of the object. For a book, this would be title, author, isbn etc. You'd probably want a unique book id too, since a library may have multiple copies of popular books. For a loan, you want to record the book, the customer, and the start/return dates. If you want history you have to save these after books are returned. A library is really a collection of other objects. You need some way for objects to persist. A librarian wouldn't type in the names of all the borrowers every day at system startup, or all the books. Steve S

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups