Introduction to Object-Oriented Programming
COMP 1405 was one of the first courses that I took towards my degree in computer science. As such, it laid down the foundations for what was to come. The course taught language basics such as syntactic constructs, data abstraction, inheritance, polymorphism, along with methods for testing and debugging code. The second ‘part’ of this course is COMP 1406, which switches focus to graphical user interface design and implementation. In both courses the Java programming language was used for the assignments.
Assignment #1
This was the first programming assignment in my university career. Although it seems simple now, at the time it was somewhat of a challenge. The purpose of the assignment was to become familiarized with the basics of the Java programming language. This is easier to see later as the assignments become more complex.
Specifically the goal of this assignment was to create a loan calculator. The user would input the principle amount, interest rate, and number of months as a loan term. The program would then calculate and print out a payment schedule to match this criteria. The instructions were to create this without using object oriented programming principles, so it turned out to be a rather simple assignment.
Assignment #2
The second assignment in the course was an implementation of a bank account; the application which I am quite sure every computer science student must write at least once in their career.
In this assignment there were four classes and an enumerated type made. The enumerated type represented a transaction; which was either a deposit, withdrawal, or service charge. Classes were made for the bank account, transaction, and transaction record. Though I didn’t realize it at the time the transaction record was simply a queue data structure with a maximum size restriction, although it may have not been implemented as one.
Categories
- bmx (1)
- hardware (1)
- software (2)
- uncategorized (1)
Articles
- January 2012 (2)
- November 2011 (3)