CSCI 235 - Spring 2024 - Term Project

Algorithmic Adventures II: The Exponential Creature Odyssey

Project 1 - The Creature class: A Review of OOP

 

Intro

This semester you will embark on an extraordinary journey developing the infrastructure for a captivating Creature-world simulation. Set within the enchanting depths of a mythical world, your simulation will offer participants a unique open-world experience where they get to capture and tame fantastic Creatures.

As the stories always go, the main character, Selfa Ensert, is tasked to collect multiple Creatures for a mysterious and powerful wizard, allegedly for a Creature zoo, and definitely not for a world-dominating army. Participants of your simulation will be able to interact with various Creature of which there are three distinct categories: the Undead, the Mystical, and the Alien.

As participants explore the world, they can encounter creatures such as Dragons, Ghouls or Mindflayers, all extraordinary beings, each with their own stories and Adventures.

Each Creature possesses unique skills, abilities, and quirks, and interactions between creatures are not just about battling to defeat others; it's about forming diverse alliances that can adapt to any situation.

This is a baseline project whose objective is to get you acquainted with the platforms we will use in this course and to refresh your knowledge of basic OOP. You will implement the Creature class. In order to successfully complete this project, we strongly recommend that you look back to your CSCI 135 coursework as a reference.

First of all, this project will introduce you to GitHub Classroom so you can work with git version control. All projects in this course will be distributed via GitHub Classroom and submitted to Gradescope via GitHub. We truly hope you will start establishing best practices of version control, INCREMENTAL coding, testing and debugging (i.e. code, test and debug one function at a time); you will need it in the near future, so better start now!


Part 1 - getting started with GitHub Classroom:

This part is absolutely essential!!! Don't skip it and do it before proceeding to Part 2

The link to accept the GitHub Classroom assignment can be found on Blackboard

The above video will also show you how to submit to Gradescope via GitHub. Make sure to refer back to these instructions when it’s time to submit.


Some additional resources if you need to brush up on basic OOP


Documentation Requirements

For ALL projects, you will receive 15% points for documentation. These are the requirements:

These together fully specify the usage of the function. You will notice that we often provide these in the project specification to describe what functionality you should implement. You will copy/paste these preambles into your code, your code will be fully documented and easy to read and use by anyone. It is not useless work, it will help you learn how to document your code. Having said that, sometimes we must add extra guidance given the scholastic context, like giving you hints for implementation. These are not things you would normally include in your documentation of professional code. Whenever you will write additional functions not in the project specification (this will be more common in later projects), you will be expected to comment your functions in a similar way, even when the preambles are not provided by the specification.

All files and all functions must be commented. Yes both .hpp and .cpp!!! It is a lot of copy/paste, but it is not useless. If someone is reading through your code to understand what it does, they shouldn't have to consult the comments in a different file!


Part 2 - The Creature Class :

You will implement the Creature class.

 

creatures

You must always separate interface from implementation(Creature.hpp and Creature.cpp), and you ONLY EVER include a class' interface (.hpp) This will be an implicit assumption in this course going forward. Work through the tasks sequentially (implement and test). Only move on to a task when you are positive that the previous one has been completed correctly. Remember that the names of classes and methods must exactly match those in this specification (FUNCTION NAMES, PARAMETER TYPES, RETURNS, PRE AND POST CONDITIONS MUST MATCH EXACTLY). This class has only accessor and mutator functions for its public data members. Recall that accessor functions (e.g. getName()) are used to access the private data members (e.g. all getName() will do is return name_, the private data member) and are therefore declared const, while mutator functions (e.g. setName()) give a value to the data members, and do not modify it's parameters, which will be passed by const reference.

Remember, you must thoroughly document your code!!!


Task 1: The Creature class

UML


Every Creature has a Name, Category, Hitpoints, Level, and a boolean if the creature is Tame.

The Creature class must define the following type INSIDE the class definition:

The Creature class must have the following private member variables:

 

The Creature class must have the following public member functions:

Constructors

Hint: Notice the default argument in the parameterized constructor.

Accessors (get) and Mutators (set)

 


Task2: Testing

To help you establish a good practice for testing, we will make the testing of your code part of the assignment. After the first few projects, this will simply be your regular development practice (thoroughly test every function you implement before moving to the next function), and we will no longer request that you submit a test file.

If you want to submit to Gradescope before completing this test file, you can simply submit an empty main function, or a partially implemented function. Comment out any untested or buggy code.

Submit a file called test.cpp that includes only a main function that does the following:

 


Submission:

You will submit your solution to Gradescope via GitHub Classroom (see video linked above). The autograder will grade the following files only:

Although Gradescope allows multiple submissions, it is not a platform for testing and/or debugging and it should not be used for that. You MUST test and debug your program locally. To help you not rely too much on Gradescope for testing, we will only allow 5 submissions per day. Before submitting to Gradescope you MUST ensure that your program compiles using the provided Makefile and runs correctly on the Linux machines in the labs at Hunter (see detailed instructions on how to upload, compile and run your files in the “Programming Guidelines” document). That is your baseline, if it runs correctly there it will run correctly on Gradescope, and if it does not, you will have the necessary feedback (compiler error messages, debugger or program output) to guide you in debugging, which you don’t have through Gradescope. “But it ran on my machine!” is not a valid argument for a submission that does not compile. Once you have done all the above you submit it to Gradescope.


Testing

How to compile with your Makefile:
In terminal, in the same directory as your Makefile and your source files, use the following command

This assumes you did not rename the Makefile and that it is the only one in the current directory.

You must always implement and test your programs INCREMENTALLY!!! What does this mean? Implement and TEST one method at a time. For each class and each function within that class:


Grading Rubrics

Correctness 80% (distributed across unit testing of your submission)
Documentation 15%
Style and Design 5% (proper naming, modularity, and organization)


Due date:

This project is due on 2/8.
No late submissions will be accepted.

Important

You must start working on the projects as soon as they are assigned to detect any problems and to address them with us well before the deadline so that we have time to get back to you before the deadline. There will be no extensions and no negotiation about project grades after the submission deadline.

 


Help

Help is available via drop-in tutoring in Lab 1001B (see Blackboard for schedule). You will be able to get help if you start early and go to the lab early. We only have 2 UTAs in the lab, the days leading up to the due date will be crowded and you will not be able to get much help then.

Authors: Georgina Woo, Tiziana Ligorio