Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question with subsections: i) A company maintains some of its item price in a random access file. The file stores the item number and its

Question with subsections:

image text in transcribed

i) A company maintains some of its item price in a random access file. The file stores the item number and its price. Write a program that creates 10 blank records first and then allow user to enter any item price using any item number from 1 to 10. Insert each new record into a file at a location that is equal to the item number. The program stops when user input -999 as item number. Your program should also check that the item number entered is between 1 and 10 and that the price cannot be negative. Save your program as CreateltemRecord.java (ii) Write a program that uses the file created in part(i) and displays all existing item numbers and their price order by item number. Save your program as DisplayRecordSequentially java. iii) Write a program that uses the file created in part(i) and allow user to check an item price by entering an item number. User should be allowed to check any item price randomly. The program stops when user enters -999 as item number. You may assume in this program that user always enter correct item number. Save your program as AccessRecordRandomly.java

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

Step: 3

blur-text-image

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

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions