Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want you to read the lab question clearly and provide solution according to it. I do not want the random solution without reading the

I want you to read the lab question clearly and provide solution according to it. I do not want the random solution without reading the lab question. If you do not know the solution, I do not want the teachers to post half solution, it will mess up my post. please do not do that. I need comments in every line I could understand and want the exact solution as the lab prefers. It is java programming. For this lab, I do not prefer the solution from Anomoyous cause every post i make he\she is the first one to reply but the solution is different. Please read the lab first before you submit the solution. It is not helping me to learn and get exact solution.

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

image text in transcribed.image text in transcribed

Create the project SP2019_LAB2_YourLastName -Re-use the class Account yourLastName, CheckingAccount yourLastName, SavingAccount yourLastName from lab2 but ensure that: Class Account_yourLastname only have two data members, account number (String), balance (double) Class CheckingAccount only have one field: serviceFee (double) Class SavingAccount only have one field: interestRate(double) Therefore, in the output of each method will not have the information of customer name or address -Add the class data structure UnsortedOptimizedArray (You can use the code on the page 91 and page 104 (showAll) for your reference because we use different nodes) The driver class named as ArrayBasedStructure_yourLastName REQUIREMENT Provide the application that can demo all the operations of the data structure UnsortedOptimizedArray and the data structure ArrayList as below: -Provide the menu to allow users to select the data structure types Array-Based data structures Demo your last name Unsorted Optimized Array structure Java ArrayList structure 1. 2. 0. Exit After finish one type, re-display the main menu to allow users to select different type If users select type 1 of Unsorted Optmized Array Structure do the followin -Create a data structure of type Unsorted Optimized Array -Display the following the menu the read the selection from users 1. 2. 3. 4. 5. 0. Insert One Account Verify encapsulation of Unsorted Optimized Array Update an account Delete an account Show all accounts Exit Task1: INSERT -Ask for information of one account. It could be checking account or saving account; insert to the data structure, then check if insert successfully display message box: "Insert Account success" Otherwise display message box "Insert Account failed" TASK2: VERIFY ENCAPSULATION -Ask for the information of one Checking account, for example, myCheckingAccount, then insert myCheckingAccount to the data structure -Modify the service fee of myAccount -Fetch a node with the same account number as myAccount, store the fetch node with different name, for example fetchedAccount -compare the service fee between myAccount and fetchedAccount . If the service fees are the same, display message box: "Unsorted Optimized Array is not encapsulated" . Otherwise display the messageg: "Unsorted Optimized Array is encapsulated" TASK3: UPDATE -Ask for the information of one checking account, for example, myCheckingAccount, then insert myCheckingAccount to the data structure -Modify the service fee of myCheckingAccount Update new myCheckingAccount to the data structure . If update return true, display message box "Update successfully" . Otherwise display message box "Update failed" TASK4: DELETE -Ask for the account number that you want to remove -Delete that account If delete returns true display message box: "Delete successfully" Otherwise display message box: "Delete failed" TASKS: SHOW ALL -show all accounts currently stored in the data structure You should allow users to continue selecting any tasks from the menu until they want to exit Unsorted Optimized Array structure If users select type 2 of Java ArrayList do the following: -Create the data structure of Java ArrayList -Insert numbers from 0 to 45 to data structure -Insert 4 Checking accounts to data structure -Insert more numbers from 46 to 95 Display the size of ArrayList -Delete the node at index 48 then display the size if ArrayList -Display the node at index 24 (node temp1) and at index 48 (node temp2) -Verify if ArrayList is encapsulated. Modify service fee of node temp2 that have been fetched at index 48 then fetch the node at index 48 again and store it to temp3 -compare the service fee of node temp2 with the service fee of node temp3 . If the information are different display message box: "Java ArrayList is encapsulated" Message Java ArraytList is encapsulated Otherwise display the message: "Java ArrayList is unencapsulated" Message Java ArayList is unescapsuated Class Account, CheckingAccount,SavingAccount Data structure class: data members, constructor, insert, fetch, delete, update, show Declare data structure of Unsorted Optimized Array Handle 5 tasks Apply polymorphisnm Handle loop back to redisplay menu until exit Declare data structure of Java ArrayList Insert numbers 0 to 45 Insert 4 accounts Insert numbers 46 to 95 Display the first size and second size Remove one node Display the node fetch at 24 and at 48 Verify ArrayList is unencapsulated Compile success qualified to the requirement comment Account yourLastName.java CheckingAccount yourLastName.java SavingAccount_yourLastName.java UnsortedOptimizedArray.java ArrayBasedStructureDemo_yourLastName.java Account yourLastName.class CheckingAccount_yourLastName.class SavingAccount_yourLastName.class UnsortedOptimizedArray.class ArrayBasedStructureDemo_yourLastName.class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions