Use C++ and WinBGIm graphic library.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter12: Points, Classes, Virtual Functions And Abstract Classes
Section: Chapter Questions
Problem 38SA
icon
Related questions
Question

Use C++ and WinBGIm graphic library.

So, basically in this question, we have to create a program for the following criteria below. To give you an idea regarding choosing a class, take a pac-man game project as an example. Here, you have the choice to choose either the class Pacman, Ghost or even the Wall or Obstacle. But, don't give the coding to find an area of a shape. Source code files should consist of all the .cpp and .hpp files. 

A. Declaring and defining the class:
The class must consist of the following members:
Attributes
Constructors (at least two) and destructor
Accessors and mutators (for all the attributes, and you may add more)
Display-related methods. Methods regarding showing or displaying the
objects onto the screen. (for example, the mehods draw (), undraw (),
etc)
Action-related methods. Methods that perform the key actions of the
objects (for example, for the Pac-man, the mehod could be run () ,
eatenByGhost(), catchGhost(), hitWal1 (), etc).
B. Separations of class declarations and definitions as well as the application
program into different files.
C. Creating object(s) and letting the object(s) to perform their actions.
for example, .. some examples scenario for the pac-man class
a pac-man (or pacmans) run(s) from one side to the other side of the
screen
the pac-mans might be colliding one to another and when this
happens, they will die or might be bouncing back)
the pac-mans change their direction of movement when the
user/player presses arrow keys
Notes: you only need to implement one action for this item.
Transcribed Image Text:A. Declaring and defining the class: The class must consist of the following members: Attributes Constructors (at least two) and destructor Accessors and mutators (for all the attributes, and you may add more) Display-related methods. Methods regarding showing or displaying the objects onto the screen. (for example, the mehods draw (), undraw (), etc) Action-related methods. Methods that perform the key actions of the objects (for example, for the Pac-man, the mehod could be run () , eatenByGhost(), catchGhost(), hitWal1 (), etc). B. Separations of class declarations and definitions as well as the application program into different files. C. Creating object(s) and letting the object(s) to perform their actions. for example, .. some examples scenario for the pac-man class a pac-man (or pacmans) run(s) from one side to the other side of the screen the pac-mans might be colliding one to another and when this happens, they will die or might be bouncing back) the pac-mans change their direction of movement when the user/player presses arrow keys Notes: you only need to implement one action for this item.
D. Implementing either one of the followings:
Pointers to objects, or
Arrays of objects.
E. Implementing either one of the followings:
• Passing objects as parameters to functions, or
Operator overloading.
Transcribed Image Text:D. Implementing either one of the followings: Pointers to objects, or Arrays of objects. E. Implementing either one of the followings: • Passing objects as parameters to functions, or Operator overloading.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning