+ 1
Guys .... can you solve this quistion??
https://mksaad.wordpress.com/2019/02/17/object-oriented-programming-project/
10 Réponses
+ 9
Could you put it in a sololearn python file and tag that here?
Also, where is your soldier class file?
+ 8
Show us please
+ 7
Show us an attempt, and if you sill don’t get it we can help you through(:
+ 4
This is a nice task but doing this properly will take at least a day.
+ 4
We will not tell you the code, it looks like you’ve barely scratched the surface of this task. I would suggest taking the Python Class tutorial again to make sure your syntax is correct and initialize your proper variables. The Q&A is here for specific and direct questions, we are not here to write your code for you
+ 4
This is the kind of task you should start with a proper class diagram that shows the attributes of the classes and how they connect to each other and only after that you should start coding.
lucidchart.com is nice for that but you can just do it with pen and paper.
I think I would implement one base class "Character" for all characters (living and not living), "split" that into the three classes proposed in the assignment "Vehicle", "Animal" and "Person" (instead of People which sounds pretty bad). Under Person you can put your soldier classes.
Then you need a class "Game" where you need to implement the players, the characters owned by the players and methods like start_game, play_move etc.
And then I would use a main_function to actually call the classes etc.
It is a lot to do. How much time do you have for finishing it?
0
Nathan Lewis  i did maaaany attempts  yesterday and i still not have the answer
0
Nathan Lewis  from  solider import solider
class  Engineer():
    def __init__(self, kind = "technician"):
         self.kind = kind
         super().__init__()
    def repairer(self):
        return ("I am reparing")
    def __str__(self):
        return Engineer .format(self.kind, self.repairer ,solider())
from  solider import solider
class  Doctor():
    def __init__(self, kind = "Teeth"):
         self.kind = kind
         super().__init__()
    def heals(self):
        return ("I am  heals")
    def __str__(self):
        return Doctor .format(self.kind, self.heals ,solider())
from  solider import solider
class  Commanders():
    def __init__(self, kind = "arm"):
         self.kind = kind
         super().__init__()
    def defends(self):
        return ("I am defends")
    def __str__(self):
        return  Commanders .format(self.kind, self.defends ,solider())
0
On my computer
0
Thoq! 
Ok but can you do it
please tell me the code?



