Tuesday, February 1, 2011

Object-Oriented Software Construction

Assignment 


Weighting:  20% of the total assessment for the module

Assessed Learning Outcomes

This assignment is designed to test your attainment of the following learning outcomes.

1.                  Concepts of encapsulation, inheritance, polymorphism as they are realized in an object-oriented approach to software construction.

2.                  Implementation of these techniques and concepts in a suitable programming language

3.                  The importance of software engineering concepts such as modularity and information hiding in the context of real world software construction.

4.                  The advantages of the OO paradigm for software engineering.


Introduction:


You are required to implement a very simple database system for a Software company.  Your program will allow the company to keep track of customers and different types of software the company develops.

You are required to define a GUI for your application.  The GUI should allow a user to complete all the tasks described below.

Specifications:

Program Overview:

Your program should enable a software company to keep track of its customers and the software products it develops.  The program will handle the following tasks:

1.      Add a software product to the database.
2.      Find information about a software product.
3.      Get a list of the software products offered by the company.
4.      Add a customer to the database.
5.      Find information about a customer.
6.      Remove a customer from the database.
7.      Get a list of customer
8.      License a particular software product to a customer.
9.      Process a new software version.

Database representation:

The database application will be represented using two lists:

1.      Customers list – A list of customers sorted by name.
2.      Software products list – An unsorted list of software products (New products are added to the end of this list.)

How you represent these lists is part of your design.  You may follow any approach you deem necessary as long as it adheres to the specifications. 

Required Classes:

You must implement and use the following classes:

Customer

This class represents a customer. A customer is identified by a name, iid, email, and a list of Software products licensed to the customer.

CompanyDatabase

This class represents the database application. The required functions are defined as follows:

1.      addSoftware: Adds a software product to the company’s software list.

2.      findSoftware: Returns a String with information about a particular software product or null if the software is not part of the database. 

3.      getSoftwareList: Returns a String with the company software products or null if no products are available.

4.      addCustomer: Adds to the database the customer whose name and e-mail address are specific in the parameters. 

5.      findCustomer: Returns a String with information about a customer or null if the customer is not part of the database.

6.      removeCustomer: Removes the customer with the specified name from the database.

7.      getCustomerList: Returns a String with the customers that are part of the database or null if no customers are present.

8.      licenseSoftwareToCustomer: Licenses the specified software to the customer. The software is added to the list of software products the user keeps

9.  newSoftwareVersion: Adds the specified software version to the list of software products associated with the company. You can assume that whoever calls this function must verify there is already a previous version of the software in the company's software products list.

Besides adding the software, the function returns a list of e-mail addresses. These e-mail addresses represent the customers that have previous versions of the software. This mailing list can be used to notify users of the availability of the update. The method will return null if there are no customers to notify.

10.  display: display all the software products in the database followed by all the customers in the database.

Additional Classes:


As part of your design you will need to define classes in addition to the ones described above (i.e. a class called Software which represents a software product).

Requirements/Assumptions


·         Customers’ ids are unique.
·         A software product is uniquely identified by the combination of the software name and version number.
·         All version and name comparisons are case insensitive.  For example, “WoRd”, “word” and “WORD” are considered identical for the purpose of comparison.
·         A company never removes a software product from its database.
·         A customer object never removes a software product from its software list as long as the customer object exists.
·         As mentioned above, you are expected to design your own classes for the various entities used in this project.