Hey there! Sign in to join this conversationNew here? Join for free
    • Thread Starter
    Offline

    0
    ReputationRep:
    A business wants to store data about companies they supply. The data to be stored includes: company name,email address and number of contracts.

    Design a class Company and draw the class diagram (Simply show data parts and methods part separate )Write a program to implement the above (in Pascal).

    Assign different values of your choice to the data parts to test your program.

    Help please?
    Offline

    3
    ReputationRep:
    Well your class diagram fro Data would be something like company_id company_name str(30), company_email_address1 str(40), company_n_contract int

    and you methods would be something like

    get_company_name
    set_company_name
    ..............
    getters and setters for each entity
    .............

    The Pascal code might depend a bit on you flavour of Pascal (e.g. Delphi) but shoudl flow really easily from the UML
    • Thread Starter
    Offline

    0
    ReputationRep:
    (Original post by nerak99)
    Well your class diagram fro Data would be something like company_id company_name str(30), company_email_address1 str(40), company_n_contract int

    and you methods would be something like

    get_company_name
    set_company_name
    ..............
    getters and setters for each entity
    .............

    The Pascal code might depend a bit on you flavour of Pascal (e.g. Delphi) but shoudl flow really easily from the UML
    Thanks
    Offline

    3
    ReputationRep:
    (Original post by The learner)
    Thanks
    You might also.add an initialise method as well. Which is also an opportunity to demonstrate a bit of overloading.
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Would you rather give up sugar, or salt?
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Write a reply...
    Reply
    Hide
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.