Docsity

Implementing LinkedList on Book Class, Assignments of Data Structures and Algorithms

Partial preview of the text

Download Implementing LinkedList on Book Class and more Assignments Data Structures and Algorithms in PDF only on Docsity!

COLLEGE OF COMPUTING, INFORMATICS AND MEDIA

BACHELOR OF COMPUTER SCIENCE (HONS.)

(CDCS230)

CSC

DATA STRUCTURES

ASSIGNMENT 1

PREPARED BY:

NAME STUDENT ID

NUR ALWANI BINTI MOHD YAZID 2023189505

GROUP:

CDCS230 4 B

PREPARED FOR:

ASSOC. PROF. DR NURAZZAH ABD RAHMAN

SUBMISSION:

5 TH^ NOVEMBER 2023

SEMESTER OCTOBER 2023 โ€“ FEBRUARY 2024

DOCUMENTATION โ€“ EXTERNAL

Purpose The application designed to implement LinkedList on Book class. The LinkedList is created from scratch from java Library. All the book object that the user input will be stored into LinkedList. The application also searches the highest and the lowest prices from the booklist and display all books that is published before and after year 2020. In the end, the application will display all the information inside book list. Files All files can be downloaded from the zip file named: 2023189505_NUR ALWANI BINTI MOHD YAZID_CDCS2304B_ASSIGNMENT1.zip The file contains of 3 java class files: Steps Write the application class AppLinkedList which contain main() to declare object linked list from class MyLinkedList. Your linked list will hold object Book declared from previous exercise. a) Declare a linked list of books object named BookLL b) ask user to enter 10 Book objects which will be inserted into linked list BookLL c) Display all books details from linked list BookLL d) Display all books which were published before the year 2020. e) Search and display the books with the highest and lowest prices. f) Declare another linked list of book objects named Book_LL_Old, ALL books published before year 2000 should be removed from BookLL and copied into linked list Book_LL_Old. g) Display all books in BookLL and Book_LL_Old.

PHASE 2: DESIGN

Flow chart

PHASE 3 : CODING

AppLinkedList Class

MyLinkedList Class

Output: