23 Oct 2018: The Company

Instructions

  1. Pick an industry.

    1. Negotiate amogst your group; break ties with rock-paper-scissor.

  2. Define a Company struct that describes companies within your chosen industry.

    1. Your struct should contain 4-6 member variables.

  3. Initialize a new company.

  4. Initialize a new reference to your existing company.

    1. Use your reference to update two member variables.

  5. Test your code

  • Stretch Goal Write a function that takes a reference to a Company struct, returns nothing, and prints a helpful description of the company.

25 Oct 2018: The Company (cont.)

  • Move your struct definition to a header (.h) file.

    • The name of your header file should match the name of your struct.

    • Ex. struct Company {…​};Company.h

  • Write a company description function (see above). Your function should:

    1. Take a reference

    2. Return nothing

    3. Print a description of the company

  • Write a program that:

    1. Creates a new company

    2. Uses the above function to describe this new company

  • Submission Form

30 Oct 2018: Company Class

  • Rewrite your company struct as a class:

    1. Make your member variables private

    2. Write a custom constructor

    3. Rewrite your description function as a member function

    4. Add a member function that modifies one or more member variables

  • Write a program that:

    1. Constructs a new object from user input

    2. Uses a member function to modify the object

    3. Uses a member function to describe the object