help with making files and putting them together

So I have this as an assignment this week and I need some help
Assignment 7, multiple files
Attached Files:
assignment7.cpp (232 B)
(don't forget to create an a07 directory in your assignments directory to put the files for this assignment)
For this assignment you need to create two classes: a Date class and a Time class. The Date class should have three private data members: day, month and year. The Time class should have two private data members: hour and minute. Both classes should have a set() member function and a display() member function. It is likely that I have written much of this code during past lectures which you are welcome to draw from. The main() function is being provided to you and is in a file named assignment7.cpp. You should not change this file in any way. You should put each class declaration in a header file and each class definition in a source file. You should also create a Makefile to build your application
You will create a total of six files:
assignment7.cpp (this file is provided)
Once you are finished, you need to bundle these files together into a single "gzipped tarball" The command to do this is:
tar czvf assignment7.tar.gz Date.cpp Date.h Time.cpp Time.h assignment7.cpp Makefile
To test that you created the gzipped tarball correctly, the following command will list all of the files in the tarball:
tar tzf assignment7.tar.gz
Your gzipped tarball is what you will turn in for this assignment

I already did the date.cpp and the time.cpp and the assignment 7.cpp is already given to us.
I'm confused on what a .h file means and what I would do from here in the assignment
a .h file is a header file. Your class definition (your private data members & your member functions without their implementation) should be in this file.

for example,

void myFunction(...); // note without the details of the function

Your Date.cpp file should be the implementation of your class functions.

So in your Date.cpp file you will need for example,

void Date::myFunction(...)

You will need to have #include "Date.h" at the top of your Date.cpp and assignment7.cpp files. Same with Time.
Last edited on
Topic archived. No new replies allowed.