QAC020C152A Object Oriented Programming
Question:
This report has been prepared as a self-reflective commentary on the work I have done to develop a menu-driven banking application in Java. The purpose of this is to reflect on my solution, the approach taken, and my thoughts about using Java for object-oriented programming.
The use of Object Oriented Programming (OOP) has many advantages, this allows the software to be easier to understand, reliable, convenient, maintainable, extensible and reusable.
Reliable because when you create Classes, for instance, you are isolating the software in distinct parts then you can modify them individually without affecting each other. By dividing the program in part, you make it convenient, facilitating their development at the same time.
It is also an easy task to maintain it since a simple modification can benefit the all software. In addition, the use of Object Oriented Programming allows the reuse of the Classes or their object in other programmes.
While writing the code I notice that I could use many attributes and methods more them once, thus to avoid repetition I have create the Class Account with the purpose of being a superclass and hold all the common attributes and methods, such as Account number, balance and so on. Then I have created subclasses: Personal Account and Business Account that extend Class Account and in these specialized classes I have added attributes specific to each of them, such as Surname for Class Personal Account and Company name for Business Account.
Polymorphism leverages extensibility. That means we can assign new classes with almost no modification of the existing code, provided the class is part of the inheritance hierarchy. The new class becomes part of the classification, like a Lego attached to a construction in such a manner that the construction would not crumble even if we detach one. As per the norms of inheritance, a new class acquires the property and methods of the superclass and is open to override only those methods that it is interested in modifying. Other derived implementation may be used as it is implemented by the superclass without making any changes.” (Manoj Debnath, 2016)
As regards weaknesses, I think the time management was the great issue. My plan for the project was to first write an algorithm, second the diagram of classes e then starts to code. Everything was well planned in my mind, but unfortunately, I underestimated the time that I would need to work on the project and to deal with my everyday commitment.
Therefore, I started to work on the project to late and I sadly decided to cut some steps. What I profound regret because it cost me some marks and as a consequence, the second-best grade of the class, according to the lecturer. As I start to work in the project relatively late I underestimated the importance of allocating adequate time for the design of classes and instead I started working straight on the implementation of the code. As a result, I could not include in my report my design documentation what cost me some marks. In the future I plan to invest more time in creating a design before starting work on implementation.
In the future I plan to invest more time in creating a design before starting work on implementation and I will allocate more time to write the report to make sure that I meet all the marks criteria.
As further enhancements, I would make the class Account abstract and its methods to facilitate the maintenance of the code. I would have made the use of exceptions where the use of input is expected. In addition, I would comment the code to aid readability. I would have created an interface.
While doing my research to write this report I found out that as the program was to be scalable I could make use of other types of collections, as such hashmap, instead of ArrayList. For future projects I intend to do an extensive research of options available to solve each necessity of the project.
As for the strengths, I think that I succeed in delivery a program that performs all the tasks required in the assignment. In regards of implementation I was able to understand I made use of the concepts of the Object-Oriented Programming. I have made a good use of do and whiles, I created a method to prevent the Id to be duplicated. The method deposit prevents the user to deposit negative value and the method withdraw prevents the user to withdraw more than its overdraft.
Test Table? Is there evidence that a full and comprehensive testing of any one function has been completed? Have you provided examples of code screen shots.
You need to provide a critical review report, starting with the discussion on which Object Oriented (OO) concepts and principles you have used in your program?
Why did you choose the OO concepts or not, why do you think your approach is effective or not? Looking back at the project do you think you made the right choices regarding the object-orientated concepts you used. Would you use the same ones again in a similar project and if so why, why not?
You can support your answer with examples of screenshots of your code.
Did you meet all of the design criteria and did your approach work? With the benefit of your experience, would you have developed the application in any other way? If so how and why?
Your commentary should show evidence of your reading and research and use the Harvard referencing system. Your report is a chance to assess what you have down and to revisit key design and technical decisions you made. Based on your experience were these the right decisions or would you do anything differently?