Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment # 2 Binary I/O Objective: Reading/Writing information in Binary format to file sequentially i.e., using DataInput/DataOutput Streams Using exception handling GUI Design and Event

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Assignment # 2 Binary I/O

Objective:

Reading/Writing information in Binary format to file sequentially i.e., using DataInput/DataOutput Streams

Using exception handling

GUI Design and Event Handling

Instructions:

Late assignments will be penalized with 5% per day. Assignment more than 2 days will not be accepted and graded.

Create a zip file of your project and submit the solution.

You should prepare TWO videos, one to demo the execution and the other to answer the requested questions and submit video

If you are working in a group, then a video record of collaboration is must otherwise NO grade will be awarded.

Problem: (15 points)

Develop an application to manage the product details using a binary file. Your application should save the information of each field of the product using binary format and each record should be of the same size. Possible operations and sample GUI is provided for your reference.

Design the Main Product GUI that looks like as shown below:

File menu has Exit menu item, so when user selects this option, it will terminate the application.

Product menu has two menu items:

Add/Update menu item, so when user selects this option, it will display Add/Update window to the user (shown below).

Find/Display menu item, so when user selects this option, it will display the Find/Display window to the user (shown below).

Program the buttons to perform following operations:

Add Should add the information of new product to the file. Product ID should be unique, quantity in hand and unit price should be number and above 0 and name is required. (1 point)

First Should read the first record stored in the file and display the details of it in the controls. (1 point)

Previous if possible, should read the previous record to the current record stored in the file and display the details of it in the controls. (1 point)

Next if possible, should read the next record to the current record stored in the file and display the details of it in the controls. (1 point)

Last Should read the last record stored in the file and display the details of it in the controls. (1 point)

Update should update the information of currently displayed record on the GUI. (1 point)

Program the Find/Display button to perform following operation:

Depending upon which radio button is selected, it should read the product details from the file and display in the JTable/JTextArea.

If All radio button is selected, it should display all the products stored in the file. (1 point)

If Keyword radio button is selected, it should display all the products stored in the file which contains the specified keyword in their name. (1 point)

If Price Range radio button is selected, it should display all the products stored in the file which has the price specified between to and from (1 point)

Evaluation:

Prepare a 5-10 min video demonstrating the execution of each of the requested feature and submit it on the blackboard.

Based upon this video following elements will be graded:

Proper GUI Design (1 point)

FunctionalityData validation and feedback

Unique ID (1 point)

In proper format (1 point)

Requested behavior (9 points)

Prepare another 5-10 min video answering the following given questions. Individual grade will be awarded based upon the answers provided.

How is the new product added to the file? (1 point)

How you made sure the product ID is unique? (1 point)

How retrieved the previousext record of the current record from the file? (1 point)

Explain the updating process of current record. (1 point)

How you extracted the records based upon the keyword in the name of the product? (1 point)

How you retrieved the first and last record from the file? (1 point)

If you are working as individual then answer only the questions 1, 2, and 3 but if you are working in a group then answer all the six questions. You can get at the most 3 points from this so everyone should answer the questions accordingly.

please please please do it in GUI*(Graphical user interface) only

no stupid answers please..

i know its computers science

Problem: (15 points) Develop an application to manage the product details using a binary file. Your application should save the information of each field of the product using binary format and each record should be of the same size. Possible operations and sample GUI is provided for your reference. Design the Main Product GUI that looks like as shown below: - File menu has "Exit" menu item, so when user selects this option, it will terminate the application. - Product menu has two menu items: - "Add/Update" menu item, so when user selects this option, it will display Add/Update window to the user (shown below). - "Find/Display" menu item, so when user selects this option, it will display the Find/Display window to the user (shown below). Program the buttons to perform following operations: - Add - Should add the information of new product to the file. Product ID should be unique, quantity in hand and unit price should be number and above 0 and name is required. ( 1 point) - First - Should read the first record stored in the file and display the details of it in the controls. (1 point) Program the buttons to perform following operations: - Add - Should add the information of new product to the file. Product ID should be unique, quantity in hand and unit price should be number and above 0 and name is required. (1 point) - First - Should read the first record stored in the file and display the details of it in the controls. (1 point) - Previous - if possible, should read the previous record to the current record stored in the file and display the details of it in the controls. ( 1 point) - Next - if possible, should read the next record to the current record stored in the file and display the details of it in the controls. (1 point) - Last - Should read the last record stored in the file and display the details of it in the controls. ( 1 point) - Update - should update the information of currently displayed record on the GUI. (1 point) Program the Find/Display button to perform following operation: - Depending upon which radio button is selected, it should read the product details from the file and display in the JTable/JTextArea. - If "All" radio button is selected, it should display all the products stored in the file. ( 1 point) - If "Keyword" radio button is selected, it should display all the products stored in the file which contains the specified keyword in their name. (1 point) - If "Price Range" radio button is selected, it should display all the products stored in the file which has the price specified between to and from (1 point)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning MySQL Get A Handle On Your Data

Authors: Seyed M M Tahaghoghi

1st Edition

0596529465, 9780596529468

More Books

Students also viewed these Databases questions