Git Product home page Git Product logo

objectorientation's Introduction

Object-Oriented using Rafa-Csharp

Challenge Description ⚙️

Considering the knowledge of the C# programming language, this project develops a simple application where the pillars of object-oriented programming are used.

Abstraction ♻️


It's checking everything we can reuse.

In the case of this project, this concept is applied in the "Character" class, where all the points that all characters have in common were gathered.

Character.cs: 📁

  • public class Character.

Inheritance 👨‍👧‍👦👨‍👩‍👧‍👧👩‍👧‍👦


Inheritance is a mechanism that allows features common to several classes to be factored on a class basis, or superclass. From a base of classes, other classes can be specified.

In this project the "Urchin", "Fox" and "Echidna" classes inherit attributes from the "Character" class. The attributes are:

  • string Name = "";
  • string Classification = "";
  • int Age = 0;
  • string Origin = "";
  • List Skill = null.

Polymorphism 🧬


Polymorphism is the principle by which classes can invoke methods that have the same identification but different behavior.

In this project "Urchin" class characters can only attack or attack with bonuses.

Urchin.cs: 📁

  • public string Attack();
  • public string Attack(int Bonus);

Encapsulation 💊


Encapsulation is a code design principle that guides us to hide the functionality and functioning of our code inside small units (usually methods and functions).

This is where the business rule usually remains.

In this project this concept is applied in several stages, one of which is the rule of the attack bonus of the "Echidna" class.

Echidna.cs: 📁

<if (Bonus <= 6)>
  • {return this.Name + " attacked with SUPER attack " + Bonus;}
  • else { return this.Name + " attacked with HYPER attack " + Bonus;}

References 📚👨🏾‍💻


The project's characters were inspired by the Sonic the Hedgehog franchise.

This is a study project proposed through the Digital Innovation One platform.

Certificate: 📜

objectorientation's People

Contributors

leanlima7 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.