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
 
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
 
oop lecture framework,list,maps,collection
oop lecture framework,list,maps,collectionoop lecture framework,list,maps,collection
oop lecture framework,list,maps,collectionssuseredfbe9
 

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
 
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
 
oop lecture framework,list,maps,collection
oop lecture framework,list,maps,collectionoop lecture framework,list,maps,collection
oop lecture framework,list,maps,collection
 

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

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 

Recently uploaded (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
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
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 

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)