Assignment 2 - Database

Suppose that you are a software developer. Some company from your town ask you to develop a database to store information about office equipments belonging to the company. Your first task is to design and develop a little prototype of the database application. The Database will be used to store and manage information about desktop computers, laptop computers and printers at the company. The following example shows a possible print out version from your program when queries about a desktop, a laptop and a printer, are appeared to it.
--------------------------------------------
DESKTOP
--------------------------------------------
            name: DS1254
            user: Henke Larsson
          office: 342
       processor: PIII 700MHz
	     RAM: 128Mb
--------------------------------------------

--------------------------------------------
LAPTOP
--------------------------------------------
            name: LP4235
            user: Lars Svensson
       processor: PIV 1GHz
             RAM: 256Mb
     manufacture: DELL
--------------------------------------------

--------------------------------------------
PRINTER
--------------------------------------------
            name: PR123
          office: 123
     manufacture: Hewlett Packard
           model: HP LaserJet 5Si MX
--------------------------------------------
     
It has to be possible to show and manipulate the content of the database via an simple text-based menu which, at least, must contains the following operations: The following part is voluntary You have to try to reuse as many component as possible (use inheritance and overriding). For example you should create a (possible abstract) base class for a common state  and behaviour for desktops, laptops and printers.

Tips 1: See the following program (with source code here) to get some idea about how one can read from the terminal and write it late back to the same terminal. (Note that you do not need to understand everything about how it works to be able to use it in this assignment).

Tips 2: You can read about the class java.util.Vector in chapter 19.4 in the book to get some tips about how you can store records of database in a table with varying size.

Clarification:


<oopj@csd.uu.se>
Last modified: Mon Jun 23 13:45:42 MET DST 2003