Skip to content

TS: OOP #51

@mkermani144

Description

@mkermani144

Description

Write a set of classes as follows:

Concept

  • is an abstract class
  • has a name prop which is initialized in the constructor
  • has a getName method
  • has a branch prop
  • has a getBranch method

DevConcept

  • is a subclass of Concept
  • its name is devConcept
  • has a branch prop, being one of the values architecture, clean-code, languages (which is initialized in the constructor)
  • has a getArea method

PhilosophicalConcept

  • is a subclass of Concept
  • its name is philosophicalConcept
  • has a branch prop (which is initialized in the constructor)
  • has a getBranch method
  • has a reasoning prop, which is an array of reasonings
  • has a addReasoning method
  • has a isPersuading method, which returns true if the number of reasonings are more than 10

Things to consider

  • You need to use access modifiers based on the use case
  • The class params should be written in constructor params format
  • In Concept class, think twice if you need to set methods as abstract

What to google

  • access modifiers
  • abstract classes
  • constructor params

Resources

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions