1
CSCE 1040
Spring 2022
Homework 3
This assignment consists in the implementation of the system you designed. This project is your
own system. That means, your solution will be unique. You will decide how your system will
work. You will decide how you will implement your menus, your functions, classes, attribute
data types, constructors, mutators, accessors and any other public member functions you want
to add to your system.
Technical Requirements:
• Create a menu that will match your design. The menu will be your user interface. The
means by which your user interacts with your system and access all the functionality
implemented in your classes.
• Your program must be written in C++ and must compile without errors in the CSE
machines using the g++ version of the compiler. If your personal preference is to code in
an editor outside of the CSE machine, you can but it is your obligation to run and
compile your code in the CSE machines way in advance before submitting for grading.
• Grading will be done in the CSE machines. If your solution does not compile and run in
the CSE your grade will decrease very significantly.
• Use any of the C++ STL containers and algorithms we studied in class.
• In homework 3 assignment you are NOT allowed to use Inheritance, -a mechanism of
reusing and extending existing classes without modifying them, thus producing
hierarchical relationships between them-.
• You are required to use a pattern-based solution. A pattern-based solution is what you
used to create your design. You created your design based on transactions or patterns,
ex: Add/Modify/Delete a Book. That is, you designed your systems based on the
transactions that will be performed using your system, and that is a pattern-based
solution. Use this approach to code your system. If you use other approach this
assignment will become too difficult for you to finish, and you might end up failing it.
There are other design methods, but you will lose points if you try other approaches,
and you will struggle more because they will make this assignment more difficult for
you.
• Use time data types and time functions in your system, use the time class in C++. We
will study the time class in the classroom, and you will have the slides on Canvas.
2
• You will also be required to create a makefile. I will teach you in the classroom how to
create a makefile.
How to start coding?
Your starting point is your design in Homework 2. If your design is incomplete, inaccurate, or
too general, you will be adding all the details missing as you code. If you have a strong design
and got a 100 in Homework 2, you are in good shape, but you still will need to update your
design. Why? Designs are the starting point in a system, but they always change over time.
Why? Because as developers and users start understanding the system’s requirements and the
technical limitations, they need to change their minds in what is needed and what is possible
for both users and the developers.
So, you will start coding the classes you designed and the public methods you created
algorithms for. And as you progress in your code you will change your mind of better ways to
do things, and then you will update your design and your code.
There is no magic formula to write a system with zero errors. It is a process that you need to go
through. You need to work on this step by step and make the adjustments you need little by
little.
Make it a priority to always have a system that complies and runs in the CSE Linux machines.
That will increase greatly your chances for a good grade in this assignment.
3
Programming Style Requirements:
Be consistent in your indentation style. You can study the code examples in zyBooks and follow
the coding style for indentation and comments used in this textbook.
Use meaningful variable names.
Add a block header comment section in every code file that you submit. In the block header
include the following:
/*
* CSCE 1040 Homework 3
* Section: 001 or 002 or 003, depending on which section you are enrolled in
* Name:
* UNT Email:
* Date submitted:
*File name:
*Description: Write here an explanation of the code that is written in this file, *include the
objective of the functions written, any required inputs and the *correct outputs. This will be an
explanation in a high level of the code you are *writing in each code file.
*/
How to test your program?
You will create your own test files. Think about the appropriate test data that you need to
create and create your files. Use your test files to make sure that your functions work properly.
Make sure that all the functions that you implement work properly by creating your own test
data files for each function. You can either do this by hand, calculating some test values on
paper to see if they match what your program says, or temporally display various intermediate
values you’re calculating in the process and desk check the results to make sure they are
correct.
The more test cases you try, the more you will understand where your system is being
successful and where it is failing.
4
How to submit your program?
You will submit three main components for this homework
1) Your code, 13 files in total. 6 .cpp files, 6 .h files and a .cpp file with your main function.
2) An updated version of your design saved in a pdf file.
3) A report answering the questions mentioned in this assignment rubric on Canvas.
4) All the data files you used to test your program. Minimum two test files per class (12
test files.)
5) Your makefile
This means you will be turning in 2 PDF’s (updated design document and report) , 7 cpp files (6
classes and 1 main) and at least 6 header files (1 for each class), all your test files and your
make file.
Each class will have two files, .cpp file and .file. You will submit the code for 6 classes, each class
will have two files (.cpp, .h). And a main file. That makes 13 files in total, 6 .cpp files, 6 .h files,
and one main file with .cpp extension as usual. You should also create a makefile to make it
easier to compile your code for both you and the grader.
Put all your files ( 2 pdf files, 6 .cpp files, 6 .h files and a main .cpp file, test files and make file)
inside a folder name the folder with your section number, first name and last name. Example:
Sectionnumber_firstname_lastname
001_rubenia_borge
Make sure you submit your program way before the due date to avoid unnecessary stressful
situations.
How will your homework be graded?
If you want to get full credit in this assignment, make sure that you are following all the
requirements in the rubric. The assignment will be graded using the rubric on Canvas. The code
will be compiled and run in the CSE machines using your makefile.
The assignment will be graded in the compiler of the CSE machines.
How to access the rubric for this homework?
https://unt.instructure.com/courses/62272/assignments/1361382
Hi