SlideShare a Scribd company logo
1 of 1
Download to read offline
Kindly share the whole working java program, in a single file , with comments of classes and
methods as discussed in following document. Thank you.
Coding - Submit all .java files to the LMS. The List. Create the ADTList class with the following
methods: public boolean isEmpty() public int size() public void add(String item, int i) public String
remove(int i) public void removeAll() public String get(int i) public int find(String item) Also
implement a tostring method to print the list elements with a comma between them, but not after
the last item (Do not use Arrays.tostring for this). Do NOT use an Arraylist or any other Java-
provided data structure. Doing so will result in a mark of zero for this lab. You will need private
variables for the array reference (type String[]) and for the number of elements in the list (type int).
You will need a constructor to set up the array reference with a specified number of spaces
Ensure the entered number of spaces is positive (not including zero), and throw a ListException
(described below) if it isn't. Do not dynamically resize the array or set a constant size. Write a
ListException and implement it when an operation can't be completed. Your exception should say
what the error is and why it happened. Write a test class in a separate file that: (1) Defines a
method, called swap, that swaps the items at the indexes provided in a list. You must define the
operations in terms of list operations, not array accesses. Do not assume anything - if the
positions provided are not occupied in the list, or are invalid (less than zero or greater than the
number of items in the list), the method should throw an exception. The method header is: public
static void swap(ADTList list, int i, int j ) (2) Creates a new List and inserts each of the following
items into your list: a. Milik, Eggs, Celery, Bananas, Apples, Oranges, Cookies, Steak b. Print the
list after every insertion (3) Removes Celery and Oranges from the list. Do not hard-code index
values for this part. Do you have a method in your list that can help? Print the list after each
removal. (4) Swaps two items in the list (with valid index values). Print the list before and after the
swap. (5) Catches any exceptions thrown as we did in the last lab. Do not catch any exceptions
inDiscussion: Write your answers to the questions on a separate paper. Do not move on to the
coding part until asked to by the instructor. (1) Write the list that results from the following
operations: a. add( "Algoma U,0) b. add("COSC,1) c. add("Data Structures", 1) d. add("Java", 3) e.
remove(1) f. remove(0)

More Related Content

Similar to Kindly share the whole working java program in a single fil.pdf

1 list datastructures
1 list datastructures1 list datastructures
1 list datastructuresNguync91368
 
Collections lecture 35 40
Collections lecture 35 40Collections lecture 35 40
Collections lecture 35 40bhawna sharma
 
AD3251-LINKED LIST,STACK ADT,QUEUE ADT.docx
AD3251-LINKED LIST,STACK ADT,QUEUE ADT.docxAD3251-LINKED LIST,STACK ADT,QUEUE ADT.docx
AD3251-LINKED LIST,STACK ADT,QUEUE ADT.docxAmuthachenthiruK
 
Java Amend the LinkedList so that 1 Your list classes must.pdf
Java Amend the LinkedList so that 1 Your list classes must.pdfJava Amend the LinkedList so that 1 Your list classes must.pdf
Java Amend the LinkedList so that 1 Your list classes must.pdfadinathassociates
 
Prompt Your task is to create a connected list implementation and .pdf
Prompt Your task is to create a connected list implementation and .pdfPrompt Your task is to create a connected list implementation and .pdf
Prompt Your task is to create a connected list implementation and .pdfalsofshionchennai
 
Data Structure.pdf
Data Structure.pdfData Structure.pdf
Data Structure.pdfMemeMiner
 
Linked list (java platform se 8 )
Linked list (java platform se 8 )Linked list (java platform se 8 )
Linked list (java platform se 8 )charan kumar
 
There are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdfThere are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdfaamousnowov
 
java I am trying to run my code but it is not letting me .pdf
java    I am trying to run my code but it is not letting me .pdfjava    I am trying to run my code but it is not letting me .pdf
java I am trying to run my code but it is not letting me .pdfadinathassociates
 
Sorting & Linked Lists
Sorting & Linked ListsSorting & Linked Lists
Sorting & Linked ListsJ.T.A.JONES
 
01-intro_stacks.ppt
01-intro_stacks.ppt01-intro_stacks.ppt
01-intro_stacks.pptsoniya555961
 
Built-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdfBuilt-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdfalivaisi1
 
Question 1 MiniList collection 20 marks In this question .pdf
Question 1 MiniList collection 20 marks In this question .pdfQuestion 1 MiniList collection 20 marks In this question .pdf
Question 1 MiniList collection 20 marks In this question .pdfabhisheksharmasre
 
Abstract Data Types (a) Explain briefly what is meant by the ter.pdf
Abstract Data Types (a) Explain briefly what is meant by the ter.pdfAbstract Data Types (a) Explain briefly what is meant by the ter.pdf
Abstract Data Types (a) Explain briefly what is meant by the ter.pdfkarymadelaneyrenne19
 

Similar to Kindly share the whole working java program in a single fil.pdf (20)

1 list datastructures
1 list datastructures1 list datastructures
1 list datastructures
 
Collections lecture 35 40
Collections lecture 35 40Collections lecture 35 40
Collections lecture 35 40
 
AD3251-LINKED LIST,STACK ADT,QUEUE ADT.docx
AD3251-LINKED LIST,STACK ADT,QUEUE ADT.docxAD3251-LINKED LIST,STACK ADT,QUEUE ADT.docx
AD3251-LINKED LIST,STACK ADT,QUEUE ADT.docx
 
Java Amend the LinkedList so that 1 Your list classes must.pdf
Java Amend the LinkedList so that 1 Your list classes must.pdfJava Amend the LinkedList so that 1 Your list classes must.pdf
Java Amend the LinkedList so that 1 Your list classes must.pdf
 
Prompt Your task is to create a connected list implementation and .pdf
Prompt Your task is to create a connected list implementation and .pdfPrompt Your task is to create a connected list implementation and .pdf
Prompt Your task is to create a connected list implementation and .pdf
 
Data Structure.pdf
Data Structure.pdfData Structure.pdf
Data Structure.pdf
 
Linked list (java platform se 8 )
Linked list (java platform se 8 )Linked list (java platform se 8 )
Linked list (java platform se 8 )
 
Unit i(dsc++)
Unit i(dsc++)Unit i(dsc++)
Unit i(dsc++)
 
Basic data-structures-v.1.1
Basic data-structures-v.1.1Basic data-structures-v.1.1
Basic data-structures-v.1.1
 
There are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdfThere are a couple of new methods that you will be writing for this pr.pdf
There are a couple of new methods that you will be writing for this pr.pdf
 
Java Collections Framework
Java Collections FrameworkJava Collections Framework
Java Collections Framework
 
Data structures in c#
Data structures in c#Data structures in c#
Data structures in c#
 
java I am trying to run my code but it is not letting me .pdf
java    I am trying to run my code but it is not letting me .pdfjava    I am trying to run my code but it is not letting me .pdf
java I am trying to run my code but it is not letting me .pdf
 
Sorting & Linked Lists
Sorting & Linked ListsSorting & Linked Lists
Sorting & Linked Lists
 
01-intro_stacks.ppt
01-intro_stacks.ppt01-intro_stacks.ppt
01-intro_stacks.ppt
 
Built-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdfBuilt-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdf
 
Array list(1)
Array list(1)Array list(1)
Array list(1)
 
Question 1 MiniList collection 20 marks In this question .pdf
Question 1 MiniList collection 20 marks In this question .pdfQuestion 1 MiniList collection 20 marks In this question .pdf
Question 1 MiniList collection 20 marks In this question .pdf
 
General Data structures
General Data structuresGeneral Data structures
General Data structures
 
Abstract Data Types (a) Explain briefly what is meant by the ter.pdf
Abstract Data Types (a) Explain briefly what is meant by the ter.pdfAbstract Data Types (a) Explain briefly what is meant by the ter.pdf
Abstract Data Types (a) Explain briefly what is meant by the ter.pdf
 

More from adilmobileshopee

KoninklijkePhilips NV vaka almas Philipsin organizasyon .pdf
KoninklijkePhilips NV vaka almas  Philipsin organizasyon .pdfKoninklijkePhilips NV vaka almas  Philipsin organizasyon .pdf
KoninklijkePhilips NV vaka almas Philipsin organizasyon .pdfadilmobileshopee
 
Know the function of these cells in plants guard cells vas.pdf
Know the function of these cells in plants guard cells vas.pdfKnow the function of these cells in plants guard cells vas.pdf
Know the function of these cells in plants guard cells vas.pdfadilmobileshopee
 
Kohwe Corporation plans to issue equity to raise 504 milli.pdf
Kohwe Corporation plans to issue equity to raise 504 milli.pdfKohwe Corporation plans to issue equity to raise 504 milli.pdf
Kohwe Corporation plans to issue equity to raise 504 milli.pdfadilmobileshopee
 
Knee Joint only focus on the static structures of the knee.pdf
Knee Joint only focus on the static structures of the knee.pdfKnee Joint only focus on the static structures of the knee.pdf
Knee Joint only focus on the static structures of the knee.pdfadilmobileshopee
 
Knighthood Inc issued 10000 shares of common stock Prepa.pdf
Knighthood Inc issued 10000 shares of common stock  Prepa.pdfKnighthood Inc issued 10000 shares of common stock  Prepa.pdf
Knighthood Inc issued 10000 shares of common stock Prepa.pdfadilmobileshopee
 
Kkler ve mikorizalar ile ilgili aadaki ifadelerden hangisi .pdf
Kkler ve mikorizalar ile ilgili aadaki ifadelerden hangisi .pdfKkler ve mikorizalar ile ilgili aadaki ifadelerden hangisi .pdf
Kkler ve mikorizalar ile ilgili aadaki ifadelerden hangisi .pdfadilmobileshopee
 
Kinubird Company reports goods available for zale at cost .pdf
Kinubird Company reports goods available for zale at cost .pdfKinubird Company reports goods available for zale at cost .pdf
Kinubird Company reports goods available for zale at cost .pdfadilmobileshopee
 
John Trucking is a public company in the need for business e.pdf
John Trucking is a public company in the need for business e.pdfJohn Trucking is a public company in the need for business e.pdf
John Trucking is a public company in the need for business e.pdfadilmobileshopee
 
Kindly Answer all Questions from 11 to 14 Question One 55.pdf
Kindly Answer all Questions from 11 to 14 Question One 55.pdfKindly Answer all Questions from 11 to 14 Question One 55.pdf
Kindly Answer all Questions from 11 to 14 Question One 55.pdfadilmobileshopee
 
John and Georgia are married file jointly and have three d.pdf
John and Georgia are married file jointly and have three d.pdfJohn and Georgia are married file jointly and have three d.pdf
John and Georgia are married file jointly and have three d.pdfadilmobileshopee
 
Kindly solve these questions Can DHCP support remote access.pdf
Kindly solve these questions Can DHCP support remote access.pdfKindly solve these questions Can DHCP support remote access.pdf
Kindly solve these questions Can DHCP support remote access.pdfadilmobileshopee
 
Kimlik av iin hangi ifade dorudur Belirli bir zaman veya .pdf
Kimlik av iin hangi ifade dorudur  Belirli bir zaman veya .pdfKimlik av iin hangi ifade dorudur  Belirli bir zaman veya .pdf
Kimlik av iin hangi ifade dorudur Belirli bir zaman veya .pdfadilmobileshopee
 
Killer Whale Inc has the following balance sheet statement.pdf
Killer Whale Inc has the following balance sheet statement.pdfKiller Whale Inc has the following balance sheet statement.pdf
Killer Whale Inc has the following balance sheet statement.pdfadilmobileshopee
 
Kemik dokusu mhendisliinde IPCSlerin belirli bir uygulamas.pdf
Kemik dokusu mhendisliinde IPCSlerin belirli bir uygulamas.pdfKemik dokusu mhendisliinde IPCSlerin belirli bir uygulamas.pdf
Kemik dokusu mhendisliinde IPCSlerin belirli bir uygulamas.pdfadilmobileshopee
 
Kelly found US 140 in her attic and sold it to a bank that .pdf
Kelly found US 140 in her attic and sold it to a bank that .pdfKelly found US 140 in her attic and sold it to a bank that .pdf
Kelly found US 140 in her attic and sold it to a bank that .pdfadilmobileshopee
 
Kevin Magnus is a payroll accountant for Mama Bear Trading C.pdf
Kevin Magnus is a payroll accountant for Mama Bear Trading C.pdfKevin Magnus is a payroll accountant for Mama Bear Trading C.pdf
Kevin Magnus is a payroll accountant for Mama Bear Trading C.pdfadilmobileshopee
 
Kesterson Corporation has provided the following information.pdf
Kesterson Corporation has provided the following information.pdfKesterson Corporation has provided the following information.pdf
Kesterson Corporation has provided the following information.pdfadilmobileshopee
 
John Rebinson single has cumulative eamings before this bi.pdf
John Rebinson single has cumulative eamings before this bi.pdfJohn Rebinson single has cumulative eamings before this bi.pdf
John Rebinson single has cumulative eamings before this bi.pdfadilmobileshopee
 
KellyAnne Public Relations acaba de pagar un dividendo anual.pdf
KellyAnne Public Relations acaba de pagar un dividendo anual.pdfKellyAnne Public Relations acaba de pagar un dividendo anual.pdf
KellyAnne Public Relations acaba de pagar un dividendo anual.pdfadilmobileshopee
 
Keisha is in the market for a new tablet computer She has s.pdf
Keisha is in the market for a new tablet computer She has s.pdfKeisha is in the market for a new tablet computer She has s.pdf
Keisha is in the market for a new tablet computer She has s.pdfadilmobileshopee
 

More from adilmobileshopee (20)

KoninklijkePhilips NV vaka almas Philipsin organizasyon .pdf
KoninklijkePhilips NV vaka almas  Philipsin organizasyon .pdfKoninklijkePhilips NV vaka almas  Philipsin organizasyon .pdf
KoninklijkePhilips NV vaka almas Philipsin organizasyon .pdf
 
Know the function of these cells in plants guard cells vas.pdf
Know the function of these cells in plants guard cells vas.pdfKnow the function of these cells in plants guard cells vas.pdf
Know the function of these cells in plants guard cells vas.pdf
 
Kohwe Corporation plans to issue equity to raise 504 milli.pdf
Kohwe Corporation plans to issue equity to raise 504 milli.pdfKohwe Corporation plans to issue equity to raise 504 milli.pdf
Kohwe Corporation plans to issue equity to raise 504 milli.pdf
 
Knee Joint only focus on the static structures of the knee.pdf
Knee Joint only focus on the static structures of the knee.pdfKnee Joint only focus on the static structures of the knee.pdf
Knee Joint only focus on the static structures of the knee.pdf
 
Knighthood Inc issued 10000 shares of common stock Prepa.pdf
Knighthood Inc issued 10000 shares of common stock  Prepa.pdfKnighthood Inc issued 10000 shares of common stock  Prepa.pdf
Knighthood Inc issued 10000 shares of common stock Prepa.pdf
 
Kkler ve mikorizalar ile ilgili aadaki ifadelerden hangisi .pdf
Kkler ve mikorizalar ile ilgili aadaki ifadelerden hangisi .pdfKkler ve mikorizalar ile ilgili aadaki ifadelerden hangisi .pdf
Kkler ve mikorizalar ile ilgili aadaki ifadelerden hangisi .pdf
 
Kinubird Company reports goods available for zale at cost .pdf
Kinubird Company reports goods available for zale at cost .pdfKinubird Company reports goods available for zale at cost .pdf
Kinubird Company reports goods available for zale at cost .pdf
 
John Trucking is a public company in the need for business e.pdf
John Trucking is a public company in the need for business e.pdfJohn Trucking is a public company in the need for business e.pdf
John Trucking is a public company in the need for business e.pdf
 
Kindly Answer all Questions from 11 to 14 Question One 55.pdf
Kindly Answer all Questions from 11 to 14 Question One 55.pdfKindly Answer all Questions from 11 to 14 Question One 55.pdf
Kindly Answer all Questions from 11 to 14 Question One 55.pdf
 
John and Georgia are married file jointly and have three d.pdf
John and Georgia are married file jointly and have three d.pdfJohn and Georgia are married file jointly and have three d.pdf
John and Georgia are married file jointly and have three d.pdf
 
Kindly solve these questions Can DHCP support remote access.pdf
Kindly solve these questions Can DHCP support remote access.pdfKindly solve these questions Can DHCP support remote access.pdf
Kindly solve these questions Can DHCP support remote access.pdf
 
Kimlik av iin hangi ifade dorudur Belirli bir zaman veya .pdf
Kimlik av iin hangi ifade dorudur  Belirli bir zaman veya .pdfKimlik av iin hangi ifade dorudur  Belirli bir zaman veya .pdf
Kimlik av iin hangi ifade dorudur Belirli bir zaman veya .pdf
 
Killer Whale Inc has the following balance sheet statement.pdf
Killer Whale Inc has the following balance sheet statement.pdfKiller Whale Inc has the following balance sheet statement.pdf
Killer Whale Inc has the following balance sheet statement.pdf
 
Kemik dokusu mhendisliinde IPCSlerin belirli bir uygulamas.pdf
Kemik dokusu mhendisliinde IPCSlerin belirli bir uygulamas.pdfKemik dokusu mhendisliinde IPCSlerin belirli bir uygulamas.pdf
Kemik dokusu mhendisliinde IPCSlerin belirli bir uygulamas.pdf
 
Kelly found US 140 in her attic and sold it to a bank that .pdf
Kelly found US 140 in her attic and sold it to a bank that .pdfKelly found US 140 in her attic and sold it to a bank that .pdf
Kelly found US 140 in her attic and sold it to a bank that .pdf
 
Kevin Magnus is a payroll accountant for Mama Bear Trading C.pdf
Kevin Magnus is a payroll accountant for Mama Bear Trading C.pdfKevin Magnus is a payroll accountant for Mama Bear Trading C.pdf
Kevin Magnus is a payroll accountant for Mama Bear Trading C.pdf
 
Kesterson Corporation has provided the following information.pdf
Kesterson Corporation has provided the following information.pdfKesterson Corporation has provided the following information.pdf
Kesterson Corporation has provided the following information.pdf
 
John Rebinson single has cumulative eamings before this bi.pdf
John Rebinson single has cumulative eamings before this bi.pdfJohn Rebinson single has cumulative eamings before this bi.pdf
John Rebinson single has cumulative eamings before this bi.pdf
 
KellyAnne Public Relations acaba de pagar un dividendo anual.pdf
KellyAnne Public Relations acaba de pagar un dividendo anual.pdfKellyAnne Public Relations acaba de pagar un dividendo anual.pdf
KellyAnne Public Relations acaba de pagar un dividendo anual.pdf
 
Keisha is in the market for a new tablet computer She has s.pdf
Keisha is in the market for a new tablet computer She has s.pdfKeisha is in the market for a new tablet computer She has s.pdf
Keisha is in the market for a new tablet computer She has s.pdf
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 

Recently uploaded (20)

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 

Kindly share the whole working java program in a single fil.pdf

  • 1. Kindly share the whole working java program, in a single file , with comments of classes and methods as discussed in following document. Thank you. Coding - Submit all .java files to the LMS. The List. Create the ADTList class with the following methods: public boolean isEmpty() public int size() public void add(String item, int i) public String remove(int i) public void removeAll() public String get(int i) public int find(String item) Also implement a tostring method to print the list elements with a comma between them, but not after the last item (Do not use Arrays.tostring for this). Do NOT use an Arraylist or any other Java- provided data structure. Doing so will result in a mark of zero for this lab. You will need private variables for the array reference (type String[]) and for the number of elements in the list (type int). You will need a constructor to set up the array reference with a specified number of spaces Ensure the entered number of spaces is positive (not including zero), and throw a ListException (described below) if it isn't. Do not dynamically resize the array or set a constant size. Write a ListException and implement it when an operation can't be completed. Your exception should say what the error is and why it happened. Write a test class in a separate file that: (1) Defines a method, called swap, that swaps the items at the indexes provided in a list. You must define the operations in terms of list operations, not array accesses. Do not assume anything - if the positions provided are not occupied in the list, or are invalid (less than zero or greater than the number of items in the list), the method should throw an exception. The method header is: public static void swap(ADTList list, int i, int j ) (2) Creates a new List and inserts each of the following items into your list: a. Milik, Eggs, Celery, Bananas, Apples, Oranges, Cookies, Steak b. Print the list after every insertion (3) Removes Celery and Oranges from the list. Do not hard-code index values for this part. Do you have a method in your list that can help? Print the list after each removal. (4) Swaps two items in the list (with valid index values). Print the list before and after the swap. (5) Catches any exceptions thrown as we did in the last lab. Do not catch any exceptions inDiscussion: Write your answers to the questions on a separate paper. Do not move on to the coding part until asked to by the instructor. (1) Write the list that results from the following operations: a. add( "Algoma U,0) b. add("COSC,1) c. add("Data Structures", 1) d. add("Java", 3) e. remove(1) f. remove(0)