guys this code I wrote passed all the unittest specifications in an oop lab. but they told me that I failed a hidden test. that my code can still be improved upon. I've tried my best but I don't know how to improve the code again. please give me ideas. am I using WET in any block. any unnecessary repetitions or redundancy? this is the code below: http://www.sololearn.com/app/python/playground/cG5UEvIEkuHd/ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

guys this code I wrote passed all the unittest specifications in an oop lab. but they told me that I failed a hidden test. that my code can still be improved upon. I've tried my best but I don't know how to improve the code again. please give me ideas. am I using WET in any block. any unnecessary repetitions or redundancy? this is the code below: python

An OOP Issue

8th Sep 2016, 12:14 PM
Dan-Awoh Emmanuel
Dan-Awoh Emmanuel - avatar
4 Answers
0
thanks fosu. please what exactly did you change. I am going through your code though.
8th Sep 2016, 4:32 PM
Dan-Awoh Emmanuel
Dan-Awoh Emmanuel - avatar
0
oh i didnt change anything, that's the link to ur code. Left it there so ppl could click it. From a quick glance, making a withdraw and deposit method for bank account was unecessary since it does nothing. If you wanted to demonstrate method overriding you could have made a better example. Though the thing that really catches my eye is that for current account you could have inherited from savings account and avoid retyping the methods but instead you inherited from bankaccount and wrote the same methods as in the savings account. Idk what you were trying to do there but you should have made the current account inherit the savingsaccount.
8th Sep 2016, 5:02 PM
Gershon Fosu
Gershon Fosu - avatar
0
hmmm. insightful. thanks
8th Sep 2016, 5:05 PM
Dan-Awoh Emmanuel
Dan-Awoh Emmanuel - avatar