SlideShare a Scribd company logo
1 of 3
Download to read offline
Java Programming:
In this programming assignment, you need to implement a storage manager that maintains a
series of data objects in each data file. Include a main method file as well. Below is the
FileManager.java that has errors. Attached are images where the errors are circled. Make sure
there are no error in the code at all and show the output.
FileManager,java
import java.io.IOException;
import java.util.Iterator;
public class FileManager {
public void put(int fileID, Long location, Object o) throws IOException,
InvalidLocationException {
if (first(location) < 0) {
throw new InvalidLocationException();
}
SlottedPage p = page(fileID, first(location));
p.put(second(location), o);
updated(p, fileID);
}
private void updated(SlottedPage p, int fileID) {
// TODO Auto-generated method stub
}
public Object get(int fileID, Long location) throws IOException, InvalidLocationException {
if (first(location) < 0) {
throw new InvalidLocationException();
}
SlottedPage p = page(fileID, first(location));
return p.get(second(location));
}
public Object remove(int fileID, Long location) throws IOException,
InvalidLocationException {
if (first(location) < 0) {
throw new InvalidLocationException();
}
SlottedPage p = page(fileID, first(location));
return p.remove(second(location));
}
private SlottedPage page(int fileID, Object first) {
// TODO Auto-generated method stub
return null;
}
private Object first(Long location) {
// TODO Auto-generated method stub
return null;
}
private int second(Long location) {
// TODO Auto-generated method stub
return 0;
}
public Iterator iterator(int fileID) throws IOException {
SlottedPage[] pages = pages(fileID);
return new PageIterator(pages);
}
private SlottedPage[] pages(int fileID) {
// TODO Auto-generated method stub
return null;
}
}
import java.io.IOException; public class FileManager { public void put(int fileID, Long
location, Object o) throws IOException, InvalidLocationException if (first ( location )<0){ throw
new InvodialocationException(); } SlottedPage p= page(fileID, first(location)); p put
(second(location), o); undaced (p, fileID); } private void updated(SlottedPage p, int fileID) { //
TODO Auto-generated method stub public Object get(int filetD Long location) throws
IOException, InvalidLocationException { if (first(location) timow IlW
InvailatocationException(); } SlottedPage p = page(fileID, first(location)); return
p.get(second(location));

More Related Content

Similar to Java Programming In this programming assignment, you need to impl.pdf

Important java programs(collection+file)
Important java programs(collection+file)Important java programs(collection+file)
Important java programs(collection+file)Alok Kumar
 
JAVA Q2- Write a program that reads strings from the user and writes t.docx
JAVA Q2- Write a program that reads strings from the user and writes t.docxJAVA Q2- Write a program that reads strings from the user and writes t.docx
JAVA Q2- Write a program that reads strings from the user and writes t.docxmichael1810
 
Android Studio Assignment HelpCan someone who is familiar with And.pdf
Android Studio Assignment HelpCan someone who is familiar with And.pdfAndroid Studio Assignment HelpCan someone who is familiar with And.pdf
Android Studio Assignment HelpCan someone who is familiar with And.pdffeelinggift
 
2. Write a program which will open an input file and write to an out.pdf
2. Write a program which will open an input file and write to an out.pdf2. Write a program which will open an input file and write to an out.pdf
2. Write a program which will open an input file and write to an out.pdfrbjain2007
 
PAGE 1Input output for a file tutorialStreams and File IOI.docx
PAGE  1Input output for a file tutorialStreams and File IOI.docxPAGE  1Input output for a file tutorialStreams and File IOI.docx
PAGE 1Input output for a file tutorialStreams and File IOI.docxalfred4lewis58146
 
Use arrays to store data for analysis. Use functions to perform the .pdf
Use arrays to store data for analysis. Use functions to perform the .pdfUse arrays to store data for analysis. Use functions to perform the .pdf
Use arrays to store data for analysis. Use functions to perform the .pdffootworld1
 
• GUI design using drag and drop feature of IDE(Net beans), • File IO
•	GUI design using drag and drop feature of IDE(Net beans), •	File IO•	GUI design using drag and drop feature of IDE(Net beans), •	File IO
• GUI design using drag and drop feature of IDE(Net beans), • File IOSyedShahroseSohail
 
Take control. write a plugin. part II
Take control. write a plugin. part IITake control. write a plugin. part II
Take control. write a plugin. part IIBaruch Sadogursky
 
Input output files in java
Input output files in javaInput output files in java
Input output files in javaKavitha713564
 
The Java Program for the above given isimport java.io.File;impo.pdf
The Java Program for the above given isimport java.io.File;impo.pdfThe Java Program for the above given isimport java.io.File;impo.pdf
The Java Program for the above given isimport java.io.File;impo.pdfanjanacottonmills
 
Java Program Photo Viewer1. Write an app called viewer that will .pdf
Java Program Photo Viewer1. Write an app called viewer that will .pdfJava Program Photo Viewer1. Write an app called viewer that will .pdf
Java Program Photo Viewer1. Write an app called viewer that will .pdfbhim1213
 
DisplayBook.java import java.io.File; import java.io.FileInput.pdf
DisplayBook.java import java.io.File; import java.io.FileInput.pdfDisplayBook.java import java.io.File; import java.io.FileInput.pdf
DisplayBook.java import java.io.File; import java.io.FileInput.pdfsudheerforce
 
Apache Utilities At Work V5
Apache Utilities At Work   V5Apache Utilities At Work   V5
Apache Utilities At Work V5Tom Marrs
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotationjavatwo2011
 

Similar to Java Programming In this programming assignment, you need to impl.pdf (20)

Important java programs(collection+file)
Important java programs(collection+file)Important java programs(collection+file)
Important java programs(collection+file)
 
JAVA Q2- Write a program that reads strings from the user and writes t.docx
JAVA Q2- Write a program that reads strings from the user and writes t.docxJAVA Q2- Write a program that reads strings from the user and writes t.docx
JAVA Q2- Write a program that reads strings from the user and writes t.docx
 
Android Studio Assignment HelpCan someone who is familiar with And.pdf
Android Studio Assignment HelpCan someone who is familiar with And.pdfAndroid Studio Assignment HelpCan someone who is familiar with And.pdf
Android Studio Assignment HelpCan someone who is familiar with And.pdf
 
2. Write a program which will open an input file and write to an out.pdf
2. Write a program which will open an input file and write to an out.pdf2. Write a program which will open an input file and write to an out.pdf
2. Write a program which will open an input file and write to an out.pdf
 
PAGE 1Input output for a file tutorialStreams and File IOI.docx
PAGE  1Input output for a file tutorialStreams and File IOI.docxPAGE  1Input output for a file tutorialStreams and File IOI.docx
PAGE 1Input output for a file tutorialStreams and File IOI.docx
 
Java 7
Java 7Java 7
Java 7
 
Use arrays to store data for analysis. Use functions to perform the .pdf
Use arrays to store data for analysis. Use functions to perform the .pdfUse arrays to store data for analysis. Use functions to perform the .pdf
Use arrays to store data for analysis. Use functions to perform the .pdf
 
• GUI design using drag and drop feature of IDE(Net beans), • File IO
•	GUI design using drag and drop feature of IDE(Net beans), •	File IO•	GUI design using drag and drop feature of IDE(Net beans), •	File IO
• GUI design using drag and drop feature of IDE(Net beans), • File IO
 
Take control. write a plugin. part II
Take control. write a plugin. part IITake control. write a plugin. part II
Take control. write a plugin. part II
 
Input output files in java
Input output files in javaInput output files in java
Input output files in java
 
The Java Program for the above given isimport java.io.File;impo.pdf
The Java Program for the above given isimport java.io.File;impo.pdfThe Java Program for the above given isimport java.io.File;impo.pdf
The Java Program for the above given isimport java.io.File;impo.pdf
 
Java Program Photo Viewer1. Write an app called viewer that will .pdf
Java Program Photo Viewer1. Write an app called viewer that will .pdfJava Program Photo Viewer1. Write an app called viewer that will .pdf
Java Program Photo Viewer1. Write an app called viewer that will .pdf
 
DisplayBook.java import java.io.File; import java.io.FileInput.pdf
DisplayBook.java import java.io.File; import java.io.FileInput.pdfDisplayBook.java import java.io.File; import java.io.FileInput.pdf
DisplayBook.java import java.io.File; import java.io.FileInput.pdf
 
Tuto jtatoo
Tuto jtatooTuto jtatoo
Tuto jtatoo
 
ExtraFileIO.pptx
ExtraFileIO.pptxExtraFileIO.pptx
ExtraFileIO.pptx
 
Apache Utilities At Work V5
Apache Utilities At Work   V5Apache Utilities At Work   V5
Apache Utilities At Work V5
 
FileHandling.docx
FileHandling.docxFileHandling.docx
FileHandling.docx
 
比XML更好用的Java Annotation
比XML更好用的Java Annotation比XML更好用的Java Annotation
比XML更好用的Java Annotation
 
1_JavIntro
1_JavIntro1_JavIntro
1_JavIntro
 
Android workshop
Android workshopAndroid workshop
Android workshop
 

More from sanjeevbansal1970

In the year 3000, engineers at MIT finally created the technology ne.pdf
In the year 3000, engineers at MIT finally created the technology ne.pdfIn the year 3000, engineers at MIT finally created the technology ne.pdf
In the year 3000, engineers at MIT finally created the technology ne.pdfsanjeevbansal1970
 
In the context of fraud explain the differences between (1) incentiv.pdf
In the context of fraud explain the differences between (1) incentiv.pdfIn the context of fraud explain the differences between (1) incentiv.pdf
In the context of fraud explain the differences between (1) incentiv.pdfsanjeevbansal1970
 
In the article liars dont qualify by Junius Edwards, What does the .pdf
In the article liars dont qualify by Junius Edwards, What does the .pdfIn the article liars dont qualify by Junius Edwards, What does the .pdf
In the article liars dont qualify by Junius Edwards, What does the .pdfsanjeevbansal1970
 
In PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdf
In PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdfIn PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdf
In PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdfsanjeevbansal1970
 
In the early 1970s, the US economy experienced a strong increase in.pdf
In the early 1970s, the US economy experienced a strong increase in.pdfIn the early 1970s, the US economy experienced a strong increase in.pdf
In the early 1970s, the US economy experienced a strong increase in.pdfsanjeevbansal1970
 
In the context of crystallization of monazite in a silicate melt, La.pdf
In the context of crystallization of monazite in a silicate melt, La.pdfIn the context of crystallization of monazite in a silicate melt, La.pdf
In the context of crystallization of monazite in a silicate melt, La.pdfsanjeevbansal1970
 
in the article liars dont qualify, y Junius Edwards, What does the .pdf
in the article liars dont qualify, y Junius Edwards, What does the .pdfin the article liars dont qualify, y Junius Edwards, What does the .pdf
in the article liars dont qualify, y Junius Edwards, What does the .pdfsanjeevbansal1970
 
In which of the following ways can you not use a subquery in a SELEC.pdf
In which of the following ways can you not use a subquery in a SELEC.pdfIn which of the following ways can you not use a subquery in a SELEC.pdf
In which of the following ways can you not use a subquery in a SELEC.pdfsanjeevbansal1970
 
In the Government of Canada, individuals within departments to whom .pdf
In the Government of Canada, individuals within departments to whom .pdfIn the Government of Canada, individuals within departments to whom .pdf
In the Government of Canada, individuals within departments to whom .pdfsanjeevbansal1970
 
In Xcode, Using decomposition, type the code that will most efficien.pdf
In Xcode, Using decomposition, type the code that will most efficien.pdfIn Xcode, Using decomposition, type the code that will most efficien.pdf
In Xcode, Using decomposition, type the code that will most efficien.pdfsanjeevbansal1970
 
In the article liars dont qualify by Junius Edwards, What is the pu.pdf
In the article liars dont qualify by Junius Edwards, What is the pu.pdfIn the article liars dont qualify by Junius Edwards, What is the pu.pdf
In the article liars dont qualify by Junius Edwards, What is the pu.pdfsanjeevbansal1970
 
John y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdf
John y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdfJohn y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdf
John y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdfsanjeevbansal1970
 
John is a minor who lives with his mother and stepfather and not his.pdf
John is a minor who lives with his mother and stepfather and not his.pdfJohn is a minor who lives with his mother and stepfather and not his.pdf
John is a minor who lives with his mother and stepfather and not his.pdfsanjeevbansal1970
 
John and Sara are married and live in AZ. They do not have a prenup.pdf
John and Sara are married and live in AZ.  They do not have a prenup.pdfJohn and Sara are married and live in AZ.  They do not have a prenup.pdf
John and Sara are married and live in AZ. They do not have a prenup.pdfsanjeevbansal1970
 
In Visual Studios C# console app using multiple class files create a.pdf
In Visual Studios C# console app using multiple class files create a.pdfIn Visual Studios C# console app using multiple class files create a.pdf
In Visual Studios C# console app using multiple class files create a.pdfsanjeevbansal1970
 
Joel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdf
Joel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdfJoel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdf
Joel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdfsanjeevbansal1970
 
Jin has configured File History on his Windows 10 computer using an .pdf
Jin has configured File History on his Windows 10 computer using an .pdfJin has configured File History on his Windows 10 computer using an .pdf
Jin has configured File History on his Windows 10 computer using an .pdfsanjeevbansal1970
 
JJ firm has a return on equity of 15 percent, a return on assets of 10.pdf
JJ firm has a return on equity of 15 percent, a return on assets of 10.pdfJJ firm has a return on equity of 15 percent, a return on assets of 10.pdf
JJ firm has a return on equity of 15 percent, a return on assets of 10.pdfsanjeevbansal1970
 
Jim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdf
Jim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdfJim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdf
Jim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdfsanjeevbansal1970
 
Jean has her first child at age 14. By the time she is 30, she has f.pdf
Jean has her first child at age 14. By the time she is 30, she has f.pdfJean has her first child at age 14. By the time she is 30, she has f.pdf
Jean has her first child at age 14. By the time she is 30, she has f.pdfsanjeevbansal1970
 

More from sanjeevbansal1970 (20)

In the year 3000, engineers at MIT finally created the technology ne.pdf
In the year 3000, engineers at MIT finally created the technology ne.pdfIn the year 3000, engineers at MIT finally created the technology ne.pdf
In the year 3000, engineers at MIT finally created the technology ne.pdf
 
In the context of fraud explain the differences between (1) incentiv.pdf
In the context of fraud explain the differences between (1) incentiv.pdfIn the context of fraud explain the differences between (1) incentiv.pdf
In the context of fraud explain the differences between (1) incentiv.pdf
 
In the article liars dont qualify by Junius Edwards, What does the .pdf
In the article liars dont qualify by Junius Edwards, What does the .pdfIn the article liars dont qualify by Junius Edwards, What does the .pdf
In the article liars dont qualify by Junius Edwards, What does the .pdf
 
In PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdf
In PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdfIn PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdf
In PYTHON please. I will upvote!Problem 1.8 Case Study Bounc.pdf
 
In the early 1970s, the US economy experienced a strong increase in.pdf
In the early 1970s, the US economy experienced a strong increase in.pdfIn the early 1970s, the US economy experienced a strong increase in.pdf
In the early 1970s, the US economy experienced a strong increase in.pdf
 
In the context of crystallization of monazite in a silicate melt, La.pdf
In the context of crystallization of monazite in a silicate melt, La.pdfIn the context of crystallization of monazite in a silicate melt, La.pdf
In the context of crystallization of monazite in a silicate melt, La.pdf
 
in the article liars dont qualify, y Junius Edwards, What does the .pdf
in the article liars dont qualify, y Junius Edwards, What does the .pdfin the article liars dont qualify, y Junius Edwards, What does the .pdf
in the article liars dont qualify, y Junius Edwards, What does the .pdf
 
In which of the following ways can you not use a subquery in a SELEC.pdf
In which of the following ways can you not use a subquery in a SELEC.pdfIn which of the following ways can you not use a subquery in a SELEC.pdf
In which of the following ways can you not use a subquery in a SELEC.pdf
 
In the Government of Canada, individuals within departments to whom .pdf
In the Government of Canada, individuals within departments to whom .pdfIn the Government of Canada, individuals within departments to whom .pdf
In the Government of Canada, individuals within departments to whom .pdf
 
In Xcode, Using decomposition, type the code that will most efficien.pdf
In Xcode, Using decomposition, type the code that will most efficien.pdfIn Xcode, Using decomposition, type the code that will most efficien.pdf
In Xcode, Using decomposition, type the code that will most efficien.pdf
 
In the article liars dont qualify by Junius Edwards, What is the pu.pdf
In the article liars dont qualify by Junius Edwards, What is the pu.pdfIn the article liars dont qualify by Junius Edwards, What is the pu.pdf
In the article liars dont qualify by Junius Edwards, What is the pu.pdf
 
John y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdf
John y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdfJohn y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdf
John y Jim tienen aversi�n al riesgo y solo se preocupan por la medi.pdf
 
John is a minor who lives with his mother and stepfather and not his.pdf
John is a minor who lives with his mother and stepfather and not his.pdfJohn is a minor who lives with his mother and stepfather and not his.pdf
John is a minor who lives with his mother and stepfather and not his.pdf
 
John and Sara are married and live in AZ. They do not have a prenup.pdf
John and Sara are married and live in AZ.  They do not have a prenup.pdfJohn and Sara are married and live in AZ.  They do not have a prenup.pdf
John and Sara are married and live in AZ. They do not have a prenup.pdf
 
In Visual Studios C# console app using multiple class files create a.pdf
In Visual Studios C# console app using multiple class files create a.pdfIn Visual Studios C# console app using multiple class files create a.pdf
In Visual Studios C# console app using multiple class files create a.pdf
 
Joel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdf
Joel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdfJoel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdf
Joel y Maria tienen un hijo llamado David, un estudiante de 20 a�os .pdf
 
Jin has configured File History on his Windows 10 computer using an .pdf
Jin has configured File History on his Windows 10 computer using an .pdfJin has configured File History on his Windows 10 computer using an .pdf
Jin has configured File History on his Windows 10 computer using an .pdf
 
JJ firm has a return on equity of 15 percent, a return on assets of 10.pdf
JJ firm has a return on equity of 15 percent, a return on assets of 10.pdfJJ firm has a return on equity of 15 percent, a return on assets of 10.pdf
JJ firm has a return on equity of 15 percent, a return on assets of 10.pdf
 
Jim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdf
Jim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdfJim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdf
Jim Harrod, hizmetin her eyden �nce m�terileri i�in �nemli olduunu b.pdf
 
Jean has her first child at age 14. By the time she is 30, she has f.pdf
Jean has her first child at age 14. By the time she is 30, she has f.pdfJean has her first child at age 14. By the time she is 30, she has f.pdf
Jean has her first child at age 14. By the time she is 30, she has f.pdf
 

Recently uploaded

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
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
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
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
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
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
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
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
 

Recently uploaded (20)

Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
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...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
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
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
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
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
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
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
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
 

Java Programming In this programming assignment, you need to impl.pdf

  • 1. Java Programming: In this programming assignment, you need to implement a storage manager that maintains a series of data objects in each data file. Include a main method file as well. Below is the FileManager.java that has errors. Attached are images where the errors are circled. Make sure there are no error in the code at all and show the output. FileManager,java import java.io.IOException; import java.util.Iterator; public class FileManager { public void put(int fileID, Long location, Object o) throws IOException, InvalidLocationException { if (first(location) < 0) { throw new InvalidLocationException(); } SlottedPage p = page(fileID, first(location)); p.put(second(location), o); updated(p, fileID); } private void updated(SlottedPage p, int fileID) { // TODO Auto-generated method stub } public Object get(int fileID, Long location) throws IOException, InvalidLocationException { if (first(location) < 0) { throw new InvalidLocationException(); } SlottedPage p = page(fileID, first(location)); return p.get(second(location)); } public Object remove(int fileID, Long location) throws IOException, InvalidLocationException { if (first(location) < 0) { throw new InvalidLocationException();
  • 2. } SlottedPage p = page(fileID, first(location)); return p.remove(second(location)); } private SlottedPage page(int fileID, Object first) { // TODO Auto-generated method stub return null; } private Object first(Long location) { // TODO Auto-generated method stub return null; } private int second(Long location) { // TODO Auto-generated method stub return 0; } public Iterator iterator(int fileID) throws IOException { SlottedPage[] pages = pages(fileID); return new PageIterator(pages); } private SlottedPage[] pages(int fileID) { // TODO Auto-generated method stub return null; } } import java.io.IOException; public class FileManager { public void put(int fileID, Long location, Object o) throws IOException, InvalidLocationException if (first ( location )<0){ throw new InvodialocationException(); } SlottedPage p= page(fileID, first(location)); p put (second(location), o); undaced (p, fileID); } private void updated(SlottedPage p, int fileID) { // TODO Auto-generated method stub public Object get(int filetD Long location) throws IOException, InvalidLocationException { if (first(location) timow IlW
  • 3. InvailatocationException(); } SlottedPage p = page(fileID, first(location)); return p.get(second(location));