Java – Solved

$ 29.99
Category:

Description

Instructions:
1. Use Packages and Interfaces where ever applicable.
2. Handle all probable exceptions
3. Make use of Java and JDBC best practices.
4. Comments and coding standards
Create a Java application to store Item, Customer and Order data in the database
Database: Create 3 database tables

Item_XXXX (item_no number(4), description varchar2(20), category varchar2(15),price number(6,2), qty number(3))

Order_XXXX (OrderNo number(5), item_no number(4),ord_qty number(3), ord_date varchar2(10), custNo varchar2(10))

Customer_XXXX (custNo varchar2(10), custName varchar2(25), address varchar2(25))

(Note: If there is no access to database, then participants can create appropriate collections for each table/object representation. The operations can then be carried out on these collections.

1. Create a class called Item having – item_no, description, category, price and quantity as its data members.
a. Create a parameterized constructor to assign appropriate values to the data members.
b. Create appropriate getter and setter methods

2. Create a class called Order having collection of Item objects, order_qty and order_date as data members. Create getter and setter methods.

3. Create ManageOrder Class having main method and tasks are carried out according to a menu. This menu is as follows:
a. Item details
In item details ask for: (Use Item class. All operations are on database)
i. Add Item – accept item details. Use enumeration for item category (electronic, grocery and garments) check if the user has entered appropriate category.
ii. Modify item – Only description and price can be modified. Accept item no and data to be modified.
iii. Delete item – Accept item no
iv. Search Item – Search an item based on item no OR search items based on category.

b. Order details: In order details accept item_no, order_qty and custNo.
Check if the item exists in the table. If item exists display its description, otherwise display message that item does not exist.
Check the validity of item, quantity, CustNo and only then insert order data into the OrderXXX table in database/collections

c. Show Order Details

i. Show All Orders : Should display all orders in a tabular format
ii. Show Order by Order No : Accept Order No and display order details

4. Each of the above operation success/failure messages should be logged into a text file which is user defined.

Page 2 of 2

Reviews

There are no reviews yet.

Be the first to review “Java – Solved”

Your email address will not be published. Required fields are marked *