COMPUTER SCIENCE
Diploma Programme HL

A store's administrator wants to implement an information system to manage the database of its products. According to the owner, the development specifications would be:

  1. The creation of the products’ database
  2. The display of all the products of the store
  3. The searching for a batch of products by type
  4. The searching for a product according to its code
  5. The simulation of the purchase of a determined amount of product units, by calculating the total price and decreasing the existence in the database

The structure of the database should be based on the following fields:

APPLICATION STRUCTURE

DATABASE STRUCTURE

theProduct[0]=new Product("2000A","Protex",3500.0,"Bathing Soap",340);
theProduct[1]=new Product("1000D","Coca Cola 1L",4250.0,"Soda",200);
theProduct[2]=new Product("3000A","LG Twin Wash",2500000.0,"Washing Machine",50);
theProduct[3]=new Product("5000B","Rahua",10500.0,"Shampoo",100);
theProduct[4]=new Product("1000T","RC Ten",7000.0,"Soda",35);
theProduct[5]=new Product("5000M","Zeal",8700.0,"Shampoo",200);
theProduct[6]=new Product("2000F","Medimix",5900.0,"Bathing Soap",80);
theProduct[7]=new Product("1000V","Zevia",6400.0,"Soda",70);
theProduct[8]=new Product("3000P","Turbo SPA",2300000.0,"Washing Machine",12);
theProduct[9]=new Product("2000G","Pears",6000.0,"Bathing Soap",40);