0% found this document useful (0 votes)
26 views3 pages

hw05 2380

Uploaded by

captainkoi32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views3 pages

hw05 2380

Uploaded by

captainkoi32
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

CSCI 2380 Spring 2024 Mr.

Gustavo Dietrich

Homework 5: Pointers to objects Due Date: 2/29/24

This homework builds on your previous Pokémon implementation. Here, you’ll


implement a full featured Pokédex that keeps track of a Pokémon collection. Pokémon
can be added, removed, and searched for, and the entire Pokédex can be saved to or
loaded from a file.
There are two parts to this homework: extending your Pokémon class from homework 1
and implementing a new Pokédex class.

The following files are given to you:

1. A C++ header file (pokemon.h) declaring the Pokemon class.

2. A C++ header file (pokedex.h) declaring the Pokedex class.

3. A C++ source file (main.cpp) containing a main() function with tests.

4. A text file (pokedex.txt) containing a list of all normal, fighting, flying, and poison
Pokemon, one per line, in the summary string format described in pokemon.h.
CSCI 2380 Spring 2024 Mr. Gustavo Dietrich

Create new C++ source files named pokemon.cpp1 and pokedex.cpp that implement the
classes declared in pokemon.h and pokedex.h, respectively, so that pokemon.cpp,
pokedex.cpp, and the provided files compile into a program that runs with no failed tests.

Submit just the source code of pokemon.cpp and pokedex.cpp. You don't need to submit
the main.cpp nor the header files because I will use my own pokemon.h, pokedex.h, and
main.cpp files to evaluate your pokemon.cpp and pokedex.cpp files.

Review the examples discussed in class and the textbook to get an idea of what you need
to do. Analyze carefully the tests because that will help you understand how the methods
that you need to create work.

Do not hesitate to use the corresponding topic in Discussions to post your


questions/doubts about this assignment. I will reply as soon as I can.

IMPORTANT:

Make sure your program compiles and executes in full (it should pass all the tests
included in main()).
You must submit ONLY ONE solution per team.
Your program must be well commented, use meaningful identifiers, and use indentation
to improve its readability.

Your program must have the following comments at the top:

//***********************************************************************
// Team # CSCI 2380 Spring 2024 Homework # 5
// First and Last Name
// First and Last Name
//
//***********************************************************************

When done, submit your solution through Blackboard using the “Assignments” tool. Do
Not email it.
Paste the link to your final solution along with your source code in the textbox opened
when you click on Create Submission before you click on Submit.

1
Use your solution for homework 1 as a starting point.
CSCI 2380 Spring 2024 Mr. Gustavo Dietrich

The following is the basic criteria to be used to grade your submission:

You start with 100 points and then lose points as you don't do something that is required.

-8 : Incorrect implementation of Pokemon::Pokemon(string summary)


-8 : Incorrect implementation of string Pokemon::summary()
-8 : Incorrect implementation of string type_to_string(Pokemon::Type t)
-8 : Incorrect implementation of Pokemon::Type string_to_type(string s)
-8 : Incorrect implementation of Pokedex::Pokedex()
-8 : Incorrect implementation of Pokedex::Pokedex(string filename)
-8 : Incorrect implementation of void Pokedex::save(string filename)
-8 : Incorrect implementation of void Pokedex::add(Pokemon* p)
-8 : Incorrect implementation of void Pokedex::remove(Pokemon* p)
-8 : Incorrect implementation of Pokemon* Pokedex::lookup_by_name(string name)
-8 : Incorrect implementation of Pokemon* Pokedex::lookup_by_Ndex(int ndex)
-8 : Incorrect implementation of int Pokedex::size()
-30 : Program crashes when executed
-5 : Unnecessary statements in your code
-5 : Incorrect implementation of Pokemon::is_multitype()
-5 : Missing/too few comments
-5 : Incorrect implementation of Pokemon::type2()
-20: Incorrect/missing source code
-20: Incorrect/missing link to your solution
-40 : Program does not compile
-100: The code submitted is not your creation (you got it from a web site or another
person)
-100: No team contribution
-10 : Late
-100 : No submission.

You might also like