Are you pressed for time and haven’t started working on your assignment yet? Would you like to buy an assignment? Use our custom writing services for better grades. Even if your deadline is approaching fast, our writers can handle your task right when you need it.
Order a Similar Paper Order a Different Paper
Follow the instructions ..
Java Code.. Follow the instructions ..
LAB3 REQUIREMENTS -We continue to apply Object Oriented Programming to each lab; we still have the data type class and the driver class in one project. In the data structure, an object of data type class is called as a node. A data structure is a collection of nodes that is organized in some fashions. The data structure class not only stores nodes (insert nodes), but also supports operations for accessing and manipulating the nodes, such as, delete notes, update nodes, or display nodes. You can read the topics relating to ArrayList and LinkedList at HOW TO DO LAB to learn how to create an ArrayList or create a LinkedList, and how to insert, delete, update, or display the nodes to these data structure types. DATA TYPE CLASS Class FA2022_Student_yourLastName We are going to use objects of class FA2022_Student_yourLastName as nodes to demo all the operations of data structures in this lab. Provide the UML and the code of the class FA2022_Student_yourLastName that will hold the information of a student: student id (String), last name (String), first name (String), phone(String), address (String), no-argument constructor, parameterized constructor, and the method toString() to display the output of one student in the following format: Student ID: 1212121 Student name: Kevin Bellamy Phone: 2146545676 Address: 34 GreenVille Richardson TX 75080 DRIVER CLASS Class FA2022_Demo_JAVA_DataStructures_YourLastName.java Provide the pseudo-code and the code of class FA2022_Demo_JAVA_DataStructures_YourLastName that helps the users to select one of the data structure types from the following menu to work on: FA2022_Demo_JAVA_DataStructures_YourLastName.java” JAVA Data Structures – JAMES SMITH” ———————————————————- 1.DEMO JAVA ARRAYLIST 2.DEMO JAVA LINKEDLIST 0.EXIT” Type 1 or 2 to select data structure type or 0 to exit. TYPE1: JAVA ARRAYLIST ArrayList is a generic class that means it can store nodes of any data type if you do not determine the data type of nodes. The syntax to declare a data structure of Java ArrayList type as below to store nodes of any data types: ArrayList javaArrayList = new ArrayList(); After creating the javaArrayList then do the following tasks: TASK1: OPERATION ADD (INSERT NODES TO THE ArrayList) -Display the message: “TASK1: OPERATION ADD – Insert nodes to the ArrayList” -Access the operation add of the ArrayList to insert numbers from 0 to 59 to the ArrayList created above -Display message to ask and read from the keyboard the information to create 5 objects of class FA2022_Student_yourLastName and access the operation add to insert 5 these students to the above ArrayList -Continue to add numbers from 65 to 99 to the above ArrayList. TASK2: OPERATION GET (READ INFORMATION OF ONE NODE) -Display the message: “TASK2: OPERATION GET – Read information of one node” -Access the operation get of javaArrayList then display the node at index 50 (named it as number50) -Access the operation get of javaArrayList then display the node at index 60 (named it as student60) TASK3: VERIFY ENCAPSULATION (CHECK IF ArrayList IS ENCAPSULATED) Encapsulation is the feature of a data structure to protect the information of nodes stored inside from any change performed outside the data structure -Display the message: “VERIFY ENCAPSULATION FEATURE (ArrayList is not an encapsulated data structure)” -get the student at index 61 of the javaArrayList and store it as student61. -Display message and read the new address and change the address of this student61 -get the student at index 61 of the javaArrayList again and store it as inside61 -compare the address of student61 with the address of insde61. If these addresses are different display message box: “Java ArrayList is encapsulated.” THAT MEANS CHANGING THE INFORMATION OF STUDENT OUTSIDE THE ArrayList DOES NOT AFFECT THE STUDENT INSIDE THE ArrayList WHERE BOTH STUDENTS ARE READ FROM THE SAME INDEX Otherwise, display message box: “Java ArrayList is unencapsulated” TASK4: OPERATION SET (UPDATE ONE NODE WITH NEW NODE) -Display the message: “TASK4: OPERATION SET – Update information of one node” -Read and display the node at index 62 then store it to student62 -Display the message to ask the information of one new student about student id, last name, first name, address. Then create a new object newStudent of class FA2022_Student_yourLastName -Use the operation set at index 62 to update the newStudent at index 62 -read and display the node at index 62 then store it to updateStudent62 to confirm the difference of the updateStudent62 and student62 TASK5: CHECK THE SIZE (READ THE TOTAL NUMBER OF NODES IN ArrayList) -Display the message: “TASK5: OPERATION SIZE – Read total number of nodes in ArrayList” -Display the size of the javaArrayList TASK6: OPERATION REMOVE (DELETE A NODE FROM ArrayList) -Display the message: “TASK6: OPERATION REMOVE – Delete one node” -Use the operation remove to delete the node at index 63 -Display the size of the javaArrayList to see the size reduced by 1 comparing with the size of task5 TYPE2: JAVA LINKEDLIST LinkedList is also a generic class that means it can store nodes of any data type if you do not determine the data type of nodes. The syntax to declare a data structure of Java LinkedList only displaying the Student object as below: LinkedList