We are confident that we have the best essaywriters in the market. We have a team of experienced writers who are familiar with all types of essays, and we are always willing to help you with any questions or problems you might face. Plus, our writers are always available online so you can always get the help you need no matter where you are in the world.
Order a Similar Paper Order a Different Paper
Follow the instructions!!
Follow the instructions!!
COSC2436 – FA LAB3 TITLE: From Lab3, each lab will continue applying Object Oriented Programming in the projects that performs some operations to manage information that are stored in Data structures In this Lab3 we work with Java ArrayList and Java LinkedList to manage the information of Students Time to complete: Two weeks for class 16 weeks – One week for class 8 weeks HOW TO DO EACH PART Remember to do the lab with the following: *If you need help in how to create the project, how to add file .java, how to compile, how to run the program or java commands, read the instruction at HOW TO DO LAB *From now and on yourLastName will be changed to your last name *Your program should change Smith to your last name *Change JAMES SMITH to your full name *write the file name as the first comment line at the top of program *After running your program, take the picture of the output window as below from your program with your name on and paste the picture at the bottom of the document having pseudo-code to turn in Step1: Read the requirement; create UML of Data type class and write the pseudo-code in a word document by listing the step by step what you suppose to do in main() and then save it with the name as Lab3_pseudoCode_yourLastName (You can use the flowchart instead of the pseudo-code) Step2: Start editor eClipse (or editor you use) create the project write the project name FA2022_LAB3_yourLastName Add classes: FA2022_Student_yourLastName FA2022_JAVA_DataStructures_YourLastName Step3: After adding the classes, you have an empty window coming up, type code of data type class OR type the code in main() in Driver class *Each statement should end by semi-colon “;” *The lines starting with // are the comment lines. The compiler will not read the comment lines Step4: Compile and run the program Step5: Debug if there are any errors until compile successful 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