0% found this document useful (0 votes)
92 views

Assignment 2

This document provides instructions for Lab Assignment #2 in CMPS303 Data Structures for Spring 2021. It outlines 3 questions to be completed individually using specific data structures and algorithms covered in class. Students are instructed to submit a zipped folder of their solutions and source code files to Blackboard by the given deadline, with their name and student ID included as comments. Correct formatting and readability of code is important and part of the grading. Help from the lab instructor is available if needed.

Uploaded by

No one
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views

Assignment 2

This document provides instructions for Lab Assignment #2 in CMPS303 Data Structures for Spring 2021. It outlines 3 questions to be completed individually using specific data structures and algorithms covered in class. Students are instructed to submit a zipped folder of their solutions and source code files to Blackboard by the given deadline, with their name and student ID included as comments. Correct formatting and readability of code is important and part of the grading. Help from the lab instructor is available if needed.

Uploaded by

No one
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CMPS303- Data Structures Spring2021

Lab Assignment #2 [5 points: Q1:1 point, Q2: 2points, Q3: 2points]

Submission deadline: Sunday, March 7th, 2021 (end-of-day, 11:59pm)

Important Notes (must read):

1- When submitting your work, you must use Blackboard, NO other means like email submissions,
etc., are accepted.
2- Assignments are to be solved individually. It is expected that you may discuss the problems with
your classmates, however, you should NOT discuss the solutions NOR write-up solutions
together NOR copy-and-paste solutions that are not YOURS.
3- Submit your work as instructed below before the deadline. If you have any uncertainty, questions
or doubts about any of the above, ask the lab instructor.

Submission Instructions:
• In the Documents folder of your computer, create a folder called Spring2021_LabAssignment_2
in which all your work should be saved. You should submit an archive of this folder when you
finish as follows.
1. In Spring2021_LabHomework_2 folder , create an MS-Word document called mySolutions and
add your name and QUID on the top line and save the file. You will add copies of your source
files and output screens to this file. 2. Submit all of needed java files.
3. Add your name and QUID as comments on the top of each source file.
4. When you finish, save all open files, close Eclipse, close MS-Word, and then archive your
Spring2021_LabHomework_2 folder as a .rar file and upload it on Blackboard.
5. Note that the readability of your code is very important. Using meaningful identifier names for
your variables, in addition to maintaining correct source code formatting is graded as part of your
solution. Feel free to seek assistant from your lab instructor if needed.

1. With reference to lab 6, assume you have class Student that has id (int), name(String),
gpa(double), update the sorting algorithms covered to receive an array of students, and sort them
based on the gpa. Test the 3 sorting algorithms in the main

2. To class DoubleLinkedList, add method insertBeforeLastNode(E e) that inserts a new node


before the last node( list should have at least one node initially, if not just display an error
message).

3. To class SinglyLinkedList, add method insertInMiddle(E e) that inserts a new node in the
middle of the list ( list should have at least two nodes initially, if not just display an error
message) if the list has odd number of nodes, insert after the one in the middle.

You might also like