SlideShare a Scribd company logo
1 of 1
Download to read offline
1. Create a Computer class with the following attributes and methods. a. Attributes: String: CPU
; int: RAM; int: storage b. Constructor: Computer (String, int, int) c. Methods: mutators,
accessors and toString 0 2. Create a ClassHandler class with the following attributes and
methods. a. Attributes: Computer: computer; String: path b. Constructor: ClassHandler
(Computer, String) c. Methods: 1. void writeToFile (String) This method writes the details of the
computer to a file with the name of the input parameter. 2. Computer readFromFile 0 This
method reads the content of the file path and returns it as a Computer. 3. Create a Driver class to
test your ClassHandler functionalities. Your code should be able to write the values of the
attributes of an instance of Computer to a file and read the attributes back from that file.
Submitting Your Work: Compress (zip) your .java files into a new lab7_studentID.zip file

More Related Content

Similar to 1- Create a Computer class with the following attributes and methods-.pdf

Assignment- C++ Write a program that reads a text file using binary mo.docx
Assignment- C++ Write a program that reads a text file using binary mo.docxAssignment- C++ Write a program that reads a text file using binary mo.docx
Assignment- C++ Write a program that reads a text file using binary mo.docx
bickerstaffinell
 
Assignment Examples Final 07 Oct
Assignment Examples Final 07 OctAssignment Examples Final 07 Oct
Assignment Examples Final 07 Oct
Sriram Raj
 
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on python
kannikadg
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
meharikiros2
 

Similar to 1- Create a Computer class with the following attributes and methods-.pdf (20)

Assignment- C++ Write a program that reads a text file using binary mo.docx
Assignment- C++ Write a program that reads a text file using binary mo.docxAssignment- C++ Write a program that reads a text file using binary mo.docx
Assignment- C++ Write a program that reads a text file using binary mo.docx
 
Getting Started - Console Program and Problem Solving
Getting Started - Console Program and Problem SolvingGetting Started - Console Program and Problem Solving
Getting Started - Console Program and Problem Solving
 
SPF Getting Started - Console Program
SPF Getting Started - Console ProgramSPF Getting Started - Console Program
SPF Getting Started - Console Program
 
PVS-Studio vs Chromium. 3-rd Check
PVS-Studio vs Chromium. 3-rd CheckPVS-Studio vs Chromium. 3-rd Check
PVS-Studio vs Chromium. 3-rd Check
 
Let's us c language (sabeel Bugti)
Let's us c language (sabeel Bugti)Let's us c language (sabeel Bugti)
Let's us c language (sabeel Bugti)
 
Express 070 536
Express 070 536Express 070 536
Express 070 536
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
 
C++Basics2022.pptx
C++Basics2022.pptxC++Basics2022.pptx
C++Basics2022.pptx
 
GSP 125 Perfect Education/newtonhelp.com
GSP 125 Perfect Education/newtonhelp.comGSP 125 Perfect Education/newtonhelp.com
GSP 125 Perfect Education/newtonhelp.com
 
Gsp 125 Future Our Mission/newtonhelp.com
Gsp 125 Future Our Mission/newtonhelp.comGsp 125 Future Our Mission/newtonhelp.com
Gsp 125 Future Our Mission/newtonhelp.com
 
GSP 125 Become Exceptional/newtonhelp.com
GSP 125 Become Exceptional/newtonhelp.comGSP 125 Become Exceptional/newtonhelp.com
GSP 125 Become Exceptional/newtonhelp.com
 
GSP 125 Doing by learn/newtonhelp.com
GSP 125 Doing by learn/newtonhelp.comGSP 125 Doing by learn/newtonhelp.com
GSP 125 Doing by learn/newtonhelp.com
 
Gsp 125 Education Organization -- snaptutorial.com
Gsp 125   Education Organization -- snaptutorial.comGsp 125   Education Organization -- snaptutorial.com
Gsp 125 Education Organization -- snaptutorial.com
 
Assignment Examples Final 07 Oct
Assignment Examples Final 07 OctAssignment Examples Final 07 Oct
Assignment Examples Final 07 Oct
 
GSP 125 Exceptional Education - snaptutorial.com
GSP 125 Exceptional Education - snaptutorial.comGSP 125 Exceptional Education - snaptutorial.com
GSP 125 Exceptional Education - snaptutorial.com
 
GSP 125 Education Specialist / snaptutorial.com
  GSP 125 Education Specialist / snaptutorial.com  GSP 125 Education Specialist / snaptutorial.com
GSP 125 Education Specialist / snaptutorial.com
 
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on python
 
Introduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptxIntroduction-to-C-Part-1.pptx
Introduction-to-C-Part-1.pptx
 
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJIntroduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
Introduction-to-C-Part-1 JSAHSHAHSJAHSJAHSJHASJ
 
Gsp 125 Enthusiastic Study / snaptutorial.com
Gsp 125 Enthusiastic Study / snaptutorial.comGsp 125 Enthusiastic Study / snaptutorial.com
Gsp 125 Enthusiastic Study / snaptutorial.com
 

More from contact28

1- Label the left and right sides of the heart- How did you figure out.pdf
1- Label the left and right sides of the heart- How did you figure out.pdf1- Label the left and right sides of the heart- How did you figure out.pdf
1- Label the left and right sides of the heart- How did you figure out.pdf
contact28
 
1- INTRODUCTION In any introductory textbook on physical geology- the.pdf
1- INTRODUCTION In any introductory textbook on physical geology- the.pdf1- INTRODUCTION In any introductory textbook on physical geology- the.pdf
1- INTRODUCTION In any introductory textbook on physical geology- the.pdf
contact28
 

More from contact28 (20)

1- Identify symptoms and formulate a problem 2- Define the main questi.pdf
1- Identify symptoms and formulate a problem 2- Define the main questi.pdf1- Identify symptoms and formulate a problem 2- Define the main questi.pdf
1- Identify symptoms and formulate a problem 2- Define the main questi.pdf
 
1- Label the left and right sides of the heart- How did you figure out.pdf
1- Label the left and right sides of the heart- How did you figure out.pdf1- Label the left and right sides of the heart- How did you figure out.pdf
1- Label the left and right sides of the heart- How did you figure out.pdf
 
1- Is a series of chemical reactions that convert light energy- water-.pdf
1- Is a series of chemical reactions that convert light energy- water-.pdf1- Is a series of chemical reactions that convert light energy- water-.pdf
1- Is a series of chemical reactions that convert light energy- water-.pdf
 
1- Draw a Lorenz curve with equal distribution of income- Draw a Loren.pdf
1- Draw a Lorenz curve with equal distribution of income- Draw a Loren.pdf1- Draw a Lorenz curve with equal distribution of income- Draw a Loren.pdf
1- Draw a Lorenz curve with equal distribution of income- Draw a Loren.pdf
 
1- It is clear that the innate and adaptive arms of the immune respons.pdf
1- It is clear that the innate and adaptive arms of the immune respons.pdf1- It is clear that the innate and adaptive arms of the immune respons.pdf
1- It is clear that the innate and adaptive arms of the immune respons.pdf
 
1- Is Meta's metaverse on track to offer a leap in value to users- or.pdf
1- Is Meta's metaverse on track to offer a leap in value to users- or.pdf1- Is Meta's metaverse on track to offer a leap in value to users- or.pdf
1- Is Meta's metaverse on track to offer a leap in value to users- or.pdf
 
1- INTRODUCTION In any introductory textbook on physical geology- the.pdf
1- INTRODUCTION In any introductory textbook on physical geology- the.pdf1- INTRODUCTION In any introductory textbook on physical geology- the.pdf
1- INTRODUCTION In any introductory textbook on physical geology- the.pdf
 
1- In trying to determine if an illness is being caused by a Plasmodiu.pdf
1- In trying to determine if an illness is being caused by a Plasmodiu.pdf1- In trying to determine if an illness is being caused by a Plasmodiu.pdf
1- In trying to determine if an illness is being caused by a Plasmodiu.pdf
 
1- Identify four typical indirect project costs- 2- When attempting to.pdf
1- Identify four typical indirect project costs- 2- When attempting to.pdf1- Identify four typical indirect project costs- 2- When attempting to.pdf
1- Identify four typical indirect project costs- 2- When attempting to.pdf
 
1- In the onion cell is the nucleus located in the cytoplasm or the ce.pdf
1- In the onion cell is the nucleus located in the cytoplasm or the ce.pdf1- In the onion cell is the nucleus located in the cytoplasm or the ce.pdf
1- In the onion cell is the nucleus located in the cytoplasm or the ce.pdf
 
1- Identify each of the following muscles on the torso models- label t.pdf
1- Identify each of the following muscles on the torso models- label t.pdf1- Identify each of the following muscles on the torso models- label t.pdf
1- Identify each of the following muscles on the torso models- label t.pdf
 
1- In certain species of chickens the allele for black feathers (B) is.pdf
1- In certain species of chickens the allele for black feathers (B) is.pdf1- In certain species of chickens the allele for black feathers (B) is.pdf
1- In certain species of chickens the allele for black feathers (B) is.pdf
 
1- In simple terms- explain what cofounded AND extraneous variables me.pdf
1- In simple terms- explain what cofounded AND extraneous variables me.pdf1- In simple terms- explain what cofounded AND extraneous variables me.pdf
1- In simple terms- explain what cofounded AND extraneous variables me.pdf
 
1- Identify children at different ages and ask- -Tell me about yoursel.pdf
1- Identify children at different ages and ask- -Tell me about yoursel.pdf1- Identify children at different ages and ask- -Tell me about yoursel.pdf
1- Identify children at different ages and ask- -Tell me about yoursel.pdf
 
1- Does it make sense for the private equity firms to exit their Quint.pdf
1- Does it make sense for the private equity firms to exit their Quint.pdf1- Does it make sense for the private equity firms to exit their Quint.pdf
1- Does it make sense for the private equity firms to exit their Quint.pdf
 
1- Identify the relevant clinical data from the scenario 2-Prioritis.pdf
1- Identify the relevant clinical data from the scenario   2-Prioritis.pdf1- Identify the relevant clinical data from the scenario   2-Prioritis.pdf
1- Identify the relevant clinical data from the scenario 2-Prioritis.pdf
 
1- Identify the type of transformation that follows and the type(s) of.pdf
1- Identify the type of transformation that follows and the type(s) of.pdf1- Identify the type of transformation that follows and the type(s) of.pdf
1- Identify the type of transformation that follows and the type(s) of.pdf
 
1- Identify the layers of the scalp- Enumerate the important structure.pdf
1- Identify the layers of the scalp- Enumerate the important structure.pdf1- Identify the layers of the scalp- Enumerate the important structure.pdf
1- Identify the layers of the scalp- Enumerate the important structure.pdf
 
1- How might a healthcare provider apply intersectionality theory when.pdf
1- How might a healthcare provider apply intersectionality theory when.pdf1- How might a healthcare provider apply intersectionality theory when.pdf
1- How might a healthcare provider apply intersectionality theory when.pdf
 
1- Human Ancestors (10 POINTS)- Discuss the statement that -modern hum.pdf
1- Human Ancestors (10 POINTS)- Discuss the statement that -modern hum.pdf1- Human Ancestors (10 POINTS)- Discuss the statement that -modern hum.pdf
1- Human Ancestors (10 POINTS)- Discuss the statement that -modern hum.pdf
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 

Recently uploaded (20)

How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdfRich Dad Poor Dad ( PDFDrive.com )--.pdf
Rich Dad Poor Dad ( PDFDrive.com )--.pdf
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
Including Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdfIncluding Mental Health Support in Project Delivery, 14 May.pdf
Including Mental Health Support in Project Delivery, 14 May.pdf
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
The Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDFThe Story of Village Palampur Class 9 Free Study Material PDF
The Story of Village Palampur Class 9 Free Study Material PDF
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 

1- Create a Computer class with the following attributes and methods-.pdf

  • 1. 1. Create a Computer class with the following attributes and methods. a. Attributes: String: CPU ; int: RAM; int: storage b. Constructor: Computer (String, int, int) c. Methods: mutators, accessors and toString 0 2. Create a ClassHandler class with the following attributes and methods. a. Attributes: Computer: computer; String: path b. Constructor: ClassHandler (Computer, String) c. Methods: 1. void writeToFile (String) This method writes the details of the computer to a file with the name of the input parameter. 2. Computer readFromFile 0 This method reads the content of the file path and returns it as a Computer. 3. Create a Driver class to test your ClassHandler functionalities. Your code should be able to write the values of the attributes of an instance of Computer to a file and read the attributes back from that file. Submitting Your Work: Compress (zip) your .java files into a new lab7_studentID.zip file