Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 5 (Marks: 40) Design a Java application that will capture three (3) different mobile devices. The device details must be stored in parallel arrays

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Question 5 (Marks: 40) Design a Java application that will capture three (3) different mobile devices. The device details must be stored in parallel arrays for the Device ID, Device Name and Device Price. Use the following data as an example when populating the arrays. Device ID 101 Device Name Samsung S8 iPhone 75 Device Price R 15 500.00 R 13 200.00 102 103 Huawei P10 R 10 100.00 Prompt the user with the menu system for adding, searching or displaying the devices. The user must have the option to enter the numbers 1, 2, 3 or zero (0) to exit the application. Make use of JOptionPanes for input and output. Input ? Enter (1) to add devices. Enter (2) to search for device details. Enter (3) to display all the device details. Enter (0) to exit. OK Cancel If the user enters a one, prompt the user to enter in three device details. Ensure that the user is prompted to enter all three devices as per the data above. Sample Screen Shot (Device 1 only) Input X Input x Input ? Please enter the ID for Device 1 ? Please enter the name for Device 101 ? Please enter the price for device 101 101 Samsung S8 15500 Cancel OK Cancel OK Cancel OK Create a loadArray() method that will store the device details captured by the user into the three parallel arrays. O The Independent Institute of Education (Pty) Ltd 2018 Page 6 of 9 If the user enters a two provide functionality for a device search. Create a searchArray() method and write the code to enable the user to search for a specific type of device. If the Device ID is found in the array, show the product details. Sample Screen Shot Input ? Enter (1) to add devices. Enter (2) to search for device details. Enter (3) to display all the device details. Enter (0) to exit. 2 OK Cancel Input ? Enter in the Device ID 102 OK Cancel Display x i PRODUCT ID: 102 PRODUCT: iPhone 75 PRICE: R 13200.0 OK If the Device ID that the user searched for doesn't exist in the array, show a message to indicate that the device cannot be located. Sample Screen Shot Display 0 The device you entered cannot be found! OK If the user enters a three in the menu system display all the device details to the user stored in the parallel arrays. Sample Screen Shot Device Stock Report i ID DEVICE PRICE 101 Samsung S8 R15500.0 102 iPhone 7 R13200.0 103 Huawei P10 R10100.0 DEVICE COUNT: 3 OK Implement user friendliness into the application by prompting the user if they would like to add/search more devices. Sample Screen Shot Continue? ? Continue using the application? Yes No

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

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions