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.
Need essay sample on "Object Oriented Programming" ? We will write a custom essay sample specifically for you for only $12.90/page
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.