Starting from:

$25

ITSE1359 -Program 8 Classes and Objects Solved

Requirements (remember to identify the requirements by number):

•        Create a file using PyCharm.

•        Name the source file program_8.py.

•        Format code like the examples.

•        Include comments in your code like the examples.

•        Code the requirements in the numbered list below.

•        Output a header in the console: “This is Program 8”

             


Requirements to be numbered in program_8.py:  

 

Write a program to keep track of data of Pokemon characters you have captured. Note: There is no data hard-coded in the program. All data is entered by the user. See the code example at the end of this document.

Your program will have a class named Pokémon which will contain the following member data:

•        self.__name

•        self.__ability

 

The Pokémon class will contain the following member methods:

•        __init__ - constructor  

•        get_name – returns self.__name

•        get_ability – returns self.__ability

 

1.  Print “This program keeps track of Pokemon characters.”

2.  Most of the Pokémon class is provided. Complete the missing parts of the Pokémon class. For instance, add lines 6, 7, and the definitions for the get_name() and get_ability() methods.

3.  Complete the ‘display_pokemon()’ function. My version required six lines (including the ‘def’ line) but you can use more.

             

 

4.  Produce output like that shown below (your version must include Requirement statements):

 

 

 

5.  Print a statement explaining your experiences with Program 8.

TEST – TEST – TEST your application to ensure the specific program requirements are met.

•        Use the list above and the common requirements as a confirmation checklist.

More products