Object Oriented Programming

Only available on StudyMode
  • Download(s) : 52
  • Published : May 1, 2011
Open Document
Text Preview
Running head: The benefits of object oriented programming and diagram basics.

Object Oriented Programming

A program design is difficult to determine from the ground up. The first thing I find one must do is answer the simple questions; what is the end goal, what do you want the customer to see, and what is the best language to use to reach this goal. Answering the first two questions will usually lead to the third answer pretty quickly. I hardly ever use procedural programming to solve a programmatic problem, mostly because I like to reuse code I have already developed. Since procedural programming requires the same code segments to be retyped throughout the code, the code can become long and difficult to review and maintain. This leans me towards languages that have good support for objects and classes. In this assignment, we have been hired by a retail company to develop software that allows for the returns of unwanted items. Since they don’t accept any returns older than 90 days and only pay full if product was returned within 30 days, we will need to keep track of date sold, and date returned so we can determine length before return. A receipt is also required in order to get a return so tracking if the customer has the receipt is also necessary. See Figure 1 for the class diagram of classes, properties, fields, and methods. I noticed when I got to the state transition diagram Figure 4 that I didn’t take into account the amount of the return based on whether it was within 30 days or partial due to between 30 and 90 days.

Figure [ 1 ]

Figure [ 2 ]

Figure [ 3 ]

Figure [ 4 ]
References

Scribd, retrieved on 9 January 2011, from http://www.scribd.com/doc/15445225/The-Principles-of-Abstraction-Encapsulation-Informationhiding-and-Modularity
tracking img