Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6808595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:58:32+00:00 2026-05-26T19:58:32+00:00

Alright lets say I have a cPlayer class that inherits from cOrganism , which

  • 0

Alright lets say I have a cPlayer class that inherits from cOrganism, which inherits from cEntity. Now I’m ready to expand my cPlayer class and i want to add animation to my player. Would it be better to

A.) Create a cAnimation class and have cPlayer inherit from it?

B.) Create a cAnimation class and have it passed to cPlayer as an argument?

C.) Something else?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:58:33+00:00Added an answer on May 26, 2026 at 7:58 pm

    It depends on how CAnimation is designed. In general, inheritance forms either a “Implements” or “Is a” relationship between the parent and child classes.

    For example, cPlayer should inherit cAnimation went you want either:

    • cPlayer to implement the interface cAnimation
    • or, cPlayer to be a cAnimation.

    Neither seem to make any sense to me. “cAnimation” is not the kind of name you’d give an interface, and a player is not an animation.

    But this is just based on your naming. Your actual design is going to depend on the relationships between what’s controlling the animation, how it interacts with objects (maybe you need a IAnimatedObject interface?), etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, let's say that I have the following markup: <div class=ticker> <p>News Item One.
Lets say I have the following code: public class Collection implements CollectionInterface{ ElementInterface[] elementArray
Alright. Lets say i have a UITextField where a user can input an url
Alright, so let's say I have a database with a table named COMPANY_PARAMETERS that
Alright so lets say I have these files in vendor/assets/javascript/ : modernizer.js lightbox.js highchart.js
alright, so lets say i have three tables, as follows : employees( ID ,
Lets say I have a LineItem (from the over used Shopping Cart example) and
Alright, let's say I have a table that looks like this: ID | DATE
Alright. Now this question may come to you weird but i have to solve
[Note : I've simplified my example for clarity] Let's say that I have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.