SlideShare a Scribd company logo
1 of 3
Download to read offline
I am having a hard time with this problem, can you help me ???
#5. fill in the copy contructor so that it sets its data to a copy of the data of the Coin that is passed
in. Be sure that it creates a DEEP COPY. ( assuming that the Country class has a copy
constructor that creates one).
public class Coin {
//data
protected Country country;
protected String coinName;
protected int value;
// constructor
// default constructor
public Coin()
{
this.country=new Country("US");
this.coinName="Quater";
this.value=25;
}
//parametirezed constructor
public Coin(Country where,String theName,int theValue)
{
this.country=where;
this.coinName=theName;
this.value=theValue;
}
//copy constructor
public Coin(Coin another)
{
}
//methods
//getValue()-returns its value
public int getValue()
{
return value;
}
//toString-returns its String representation
public String tostring()
{
return coinName+"with value"+value;
}
}
Solution
// Copy constructor modified
public Coin(Coin another)
{
this.country=new Country(another.country); // call to the copy Constructor of Country class
this.coinName=another.coinName; // assigns instance member coinName of another object to
coinName of //current object
this.value=another.value; // assigns instance member value of another object to value of current
object
}

More Related Content

Similar to I am having a hard time with this problem, can you help me #5. .pdf

Code to copy Person.java .pdf
Code to copy Person.java .pdfCode to copy Person.java .pdf
Code to copy Person.java .pdfanokhijew
 
Please find my solution.Please let me know in case of any issue..pdf
Please find my solution.Please let me know in case of any issue..pdfPlease find my solution.Please let me know in case of any issue..pdf
Please find my solution.Please let me know in case of any issue..pdfpremkhatri99
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docxAustinaGRPaigey
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony AppsKris Wallsmith
 
Whats new in ES2019
Whats new in ES2019Whats new in ES2019
Whats new in ES2019chayanikaa
 
Cpp11 multithreading and_simd_linux_code
Cpp11 multithreading and_simd_linux_codeCpp11 multithreading and_simd_linux_code
Cpp11 multithreading and_simd_linux_codeRussell Childs
 
CountryData.cppEDIT THIS ONE#include fstream #include str.pdf
CountryData.cppEDIT THIS ONE#include fstream #include str.pdfCountryData.cppEDIT THIS ONE#include fstream #include str.pdf
CountryData.cppEDIT THIS ONE#include fstream #include str.pdfAggarwalelectronic18
 
Can you convert this code into a C++ code.pdf
Can you convert this code into a C++ code.pdfCan you convert this code into a C++ code.pdf
Can you convert this code into a C++ code.pdfFORTUNE2505
 
Create the variables, and methods needed for this classA DicePlay.pdf
Create the variables, and methods needed for this classA DicePlay.pdfCreate the variables, and methods needed for this classA DicePlay.pdf
Create the variables, and methods needed for this classA DicePlay.pdfpoblettesedanoree498
 
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docxassignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docxssuser562afc1
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Troy Miles
 
Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5Leonardo Proietti
 
implemement the game.cpp by the header file given. And create main.c.pdf
implemement the game.cpp by the header file given. And create main.c.pdfimplemement the game.cpp by the header file given. And create main.c.pdf
implemement the game.cpp by the header file given. And create main.c.pdffazilfootsteps
 
So here is the code from the previous assignment that we need to ext.pdf
So here is the code from the previous assignment that we need to ext.pdfSo here is the code from the previous assignment that we need to ext.pdf
So here is the code from the previous assignment that we need to ext.pdfleolight2
 

Similar to I am having a hard time with this problem, can you help me #5. .pdf (20)

Code to copy Person.java .pdf
Code to copy Person.java .pdfCode to copy Person.java .pdf
Code to copy Person.java .pdf
 
Please find my solution.Please let me know in case of any issue..pdf
Please find my solution.Please let me know in case of any issue..pdfPlease find my solution.Please let me know in case of any issue..pdf
Please find my solution.Please let me know in case of any issue..pdf
 
please code in c#- please note that im a complete beginner- northwind.docx
please code in c#- please note that im a complete beginner-  northwind.docxplease code in c#- please note that im a complete beginner-  northwind.docx
please code in c#- please note that im a complete beginner- northwind.docx
 
How Kris Writes Symfony Apps
How Kris Writes Symfony AppsHow Kris Writes Symfony Apps
How Kris Writes Symfony Apps
 
Whats new in ES2019
Whats new in ES2019Whats new in ES2019
Whats new in ES2019
 
ES6 is Nigh
ES6 is NighES6 is Nigh
ES6 is Nigh
 
Php
PhpPhp
Php
 
Cpp11 multithreading and_simd_linux_code
Cpp11 multithreading and_simd_linux_codeCpp11 multithreading and_simd_linux_code
Cpp11 multithreading and_simd_linux_code
 
CountryData.cppEDIT THIS ONE#include fstream #include str.pdf
CountryData.cppEDIT THIS ONE#include fstream #include str.pdfCountryData.cppEDIT THIS ONE#include fstream #include str.pdf
CountryData.cppEDIT THIS ONE#include fstream #include str.pdf
 
Can you convert this code into a C++ code.pdf
Can you convert this code into a C++ code.pdfCan you convert this code into a C++ code.pdf
Can you convert this code into a C++ code.pdf
 
Create the variables, and methods needed for this classA DicePlay.pdf
Create the variables, and methods needed for this classA DicePlay.pdfCreate the variables, and methods needed for this classA DicePlay.pdf
Create the variables, and methods needed for this classA DicePlay.pdf
 
The Xtext Grammar Language
The Xtext Grammar LanguageThe Xtext Grammar Language
The Xtext Grammar Language
 
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docxassignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
assignmentTwoCar.javaassignmentTwoCar.javapackage assignmentTw.docx
 
Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1Game Design and Development Workshop Day 1
Game Design and Development Workshop Day 1
 
Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5
 
implemement the game.cpp by the header file given. And create main.c.pdf
implemement the game.cpp by the header file given. And create main.c.pdfimplemement the game.cpp by the header file given. And create main.c.pdf
implemement the game.cpp by the header file given. And create main.c.pdf
 
So here is the code from the previous assignment that we need to ext.pdf
So here is the code from the previous assignment that we need to ext.pdfSo here is the code from the previous assignment that we need to ext.pdf
So here is the code from the previous assignment that we need to ext.pdf
 
Game dev 101 part 2
Game dev 101   part 2Game dev 101   part 2
Game dev 101 part 2
 
part2
part2part2
part2
 
ES6: Features + Rails
ES6: Features + RailsES6: Features + Rails
ES6: Features + Rails
 

More from aroramobiles1

Please help with this JAVA Assignment and show output if you can ple.pdf
Please help with this JAVA Assignment and show output if you can ple.pdfPlease help with this JAVA Assignment and show output if you can ple.pdf
Please help with this JAVA Assignment and show output if you can ple.pdfaroramobiles1
 
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdfooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdfaroramobiles1
 
ood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdfood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdfaroramobiles1
 
Multiply. 0 072(10,000) Multiply. 317.02 middot 0.01 Write the nu.pdf
Multiply.  0 072(10,000)  Multiply.  317.02 middot 0.01  Write the nu.pdfMultiply.  0 072(10,000)  Multiply.  317.02 middot 0.01  Write the nu.pdf
Multiply. 0 072(10,000) Multiply. 317.02 middot 0.01 Write the nu.pdfaroramobiles1
 
Mitochondria and chloroplasts have small genomes becauseQuestion .pdf
Mitochondria and chloroplasts have small genomes becauseQuestion .pdfMitochondria and chloroplasts have small genomes becauseQuestion .pdf
Mitochondria and chloroplasts have small genomes becauseQuestion .pdfaroramobiles1
 
Meta-population theory and island biogeography theory are similar in .pdf
Meta-population theory and island biogeography theory are similar in .pdfMeta-population theory and island biogeography theory are similar in .pdf
Meta-population theory and island biogeography theory are similar in .pdfaroramobiles1
 
Java Programpublic class Fraction {   instance variablesin.pdf
Java Programpublic class Fraction {   instance variablesin.pdfJava Programpublic class Fraction {   instance variablesin.pdf
Java Programpublic class Fraction {   instance variablesin.pdfaroramobiles1
 
Kim’s revenue one week ago were $251 less than three times Janes rev.pdf
Kim’s revenue one week ago were $251 less than three times Janes rev.pdfKim’s revenue one week ago were $251 less than three times Janes rev.pdf
Kim’s revenue one week ago were $251 less than three times Janes rev.pdfaroramobiles1
 
How has television influenced the political process, specifically th.pdf
How has television influenced the political process, specifically th.pdfHow has television influenced the political process, specifically th.pdf
How has television influenced the political process, specifically th.pdfaroramobiles1
 
HISTORY Why is it called American revolutionSolutionThe .pdf
HISTORY Why is it called American revolutionSolutionThe .pdfHISTORY Why is it called American revolutionSolutionThe .pdf
HISTORY Why is it called American revolutionSolutionThe .pdfaroramobiles1
 
Explain what #include does in a source codeSolution Th.pdf
Explain what #include  does in a source codeSolution Th.pdfExplain what #include  does in a source codeSolution Th.pdf
Explain what #include does in a source codeSolution Th.pdfaroramobiles1
 
dNdS ratios reflect patterns of genetic divergence that have accumu.pdf
dNdS ratios reflect patterns of genetic divergence that have accumu.pdfdNdS ratios reflect patterns of genetic divergence that have accumu.pdf
dNdS ratios reflect patterns of genetic divergence that have accumu.pdfaroramobiles1
 
Discuss the complexity of problem definition and the importance of a.pdf
Discuss the complexity of problem definition and the importance of a.pdfDiscuss the complexity of problem definition and the importance of a.pdf
Discuss the complexity of problem definition and the importance of a.pdfaroramobiles1
 
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdfDefine the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdfaroramobiles1
 
Describe how the principle of consistency can be applied to interfac.pdf
Describe how the principle of consistency can be applied to interfac.pdfDescribe how the principle of consistency can be applied to interfac.pdf
Describe how the principle of consistency can be applied to interfac.pdfaroramobiles1
 
Chapter 8 was tough for me. When determining the lumber needs of the.pdf
Chapter 8 was tough for me. When determining the lumber needs of the.pdfChapter 8 was tough for me. When determining the lumber needs of the.pdf
Chapter 8 was tough for me. When determining the lumber needs of the.pdfaroramobiles1
 
{public int idata;data item (key) public double ddata;data item p.pdf
{public int idata;data item (key) public double ddata;data item p.pdf{public int idata;data item (key) public double ddata;data item p.pdf
{public int idata;data item (key) public double ddata;data item p.pdfaroramobiles1
 
You have been given a file that contains fields relating to CD infor.pdf
You have been given a file that contains fields relating to CD infor.pdfYou have been given a file that contains fields relating to CD infor.pdf
You have been given a file that contains fields relating to CD infor.pdfaroramobiles1
 
Write a java method named flipLines that accepts as its parameter a .pdf
Write a java method named flipLines that accepts as its parameter a .pdfWrite a java method named flipLines that accepts as its parameter a .pdf
Write a java method named flipLines that accepts as its parameter a .pdfaroramobiles1
 
Which of the following isare true regarding router operationA. R.pdf
Which of the following isare true regarding router operationA. R.pdfWhich of the following isare true regarding router operationA. R.pdf
Which of the following isare true regarding router operationA. R.pdfaroramobiles1
 

More from aroramobiles1 (20)

Please help with this JAVA Assignment and show output if you can ple.pdf
Please help with this JAVA Assignment and show output if you can ple.pdfPlease help with this JAVA Assignment and show output if you can ple.pdf
Please help with this JAVA Assignment and show output if you can ple.pdf
 
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdfooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
ooo T-Mobile LTE 820 PM courses.apexlearning.com Question 34 of 42 M.pdf
 
ood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdfood evening people. Ive been working on this code that sends a bur.pdf
ood evening people. Ive been working on this code that sends a bur.pdf
 
Multiply. 0 072(10,000) Multiply. 317.02 middot 0.01 Write the nu.pdf
Multiply.  0 072(10,000)  Multiply.  317.02 middot 0.01  Write the nu.pdfMultiply.  0 072(10,000)  Multiply.  317.02 middot 0.01  Write the nu.pdf
Multiply. 0 072(10,000) Multiply. 317.02 middot 0.01 Write the nu.pdf
 
Mitochondria and chloroplasts have small genomes becauseQuestion .pdf
Mitochondria and chloroplasts have small genomes becauseQuestion .pdfMitochondria and chloroplasts have small genomes becauseQuestion .pdf
Mitochondria and chloroplasts have small genomes becauseQuestion .pdf
 
Meta-population theory and island biogeography theory are similar in .pdf
Meta-population theory and island biogeography theory are similar in .pdfMeta-population theory and island biogeography theory are similar in .pdf
Meta-population theory and island biogeography theory are similar in .pdf
 
Java Programpublic class Fraction {   instance variablesin.pdf
Java Programpublic class Fraction {   instance variablesin.pdfJava Programpublic class Fraction {   instance variablesin.pdf
Java Programpublic class Fraction {   instance variablesin.pdf
 
Kim’s revenue one week ago were $251 less than three times Janes rev.pdf
Kim’s revenue one week ago were $251 less than three times Janes rev.pdfKim’s revenue one week ago were $251 less than three times Janes rev.pdf
Kim’s revenue one week ago were $251 less than three times Janes rev.pdf
 
How has television influenced the political process, specifically th.pdf
How has television influenced the political process, specifically th.pdfHow has television influenced the political process, specifically th.pdf
How has television influenced the political process, specifically th.pdf
 
HISTORY Why is it called American revolutionSolutionThe .pdf
HISTORY Why is it called American revolutionSolutionThe .pdfHISTORY Why is it called American revolutionSolutionThe .pdf
HISTORY Why is it called American revolutionSolutionThe .pdf
 
Explain what #include does in a source codeSolution Th.pdf
Explain what #include  does in a source codeSolution Th.pdfExplain what #include  does in a source codeSolution Th.pdf
Explain what #include does in a source codeSolution Th.pdf
 
dNdS ratios reflect patterns of genetic divergence that have accumu.pdf
dNdS ratios reflect patterns of genetic divergence that have accumu.pdfdNdS ratios reflect patterns of genetic divergence that have accumu.pdf
dNdS ratios reflect patterns of genetic divergence that have accumu.pdf
 
Discuss the complexity of problem definition and the importance of a.pdf
Discuss the complexity of problem definition and the importance of a.pdfDiscuss the complexity of problem definition and the importance of a.pdf
Discuss the complexity of problem definition and the importance of a.pdf
 
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdfDefine the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
Define the following terms i. Hydraulic gradientii. Seepageiii. Cr.pdf
 
Describe how the principle of consistency can be applied to interfac.pdf
Describe how the principle of consistency can be applied to interfac.pdfDescribe how the principle of consistency can be applied to interfac.pdf
Describe how the principle of consistency can be applied to interfac.pdf
 
Chapter 8 was tough for me. When determining the lumber needs of the.pdf
Chapter 8 was tough for me. When determining the lumber needs of the.pdfChapter 8 was tough for me. When determining the lumber needs of the.pdf
Chapter 8 was tough for me. When determining the lumber needs of the.pdf
 
{public int idata;data item (key) public double ddata;data item p.pdf
{public int idata;data item (key) public double ddata;data item p.pdf{public int idata;data item (key) public double ddata;data item p.pdf
{public int idata;data item (key) public double ddata;data item p.pdf
 
You have been given a file that contains fields relating to CD infor.pdf
You have been given a file that contains fields relating to CD infor.pdfYou have been given a file that contains fields relating to CD infor.pdf
You have been given a file that contains fields relating to CD infor.pdf
 
Write a java method named flipLines that accepts as its parameter a .pdf
Write a java method named flipLines that accepts as its parameter a .pdfWrite a java method named flipLines that accepts as its parameter a .pdf
Write a java method named flipLines that accepts as its parameter a .pdf
 
Which of the following isare true regarding router operationA. R.pdf
Which of the following isare true regarding router operationA. R.pdfWhich of the following isare true regarding router operationA. R.pdf
Which of the following isare true regarding router operationA. R.pdf
 

Recently uploaded

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
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
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxPooja Bhuva
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
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
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
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
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
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
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibitjbellavia9
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 

Recently uploaded (20)

ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
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
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
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Ữ Â...
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
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.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
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
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 

I am having a hard time with this problem, can you help me #5. .pdf

  • 1. I am having a hard time with this problem, can you help me ??? #5. fill in the copy contructor so that it sets its data to a copy of the data of the Coin that is passed in. Be sure that it creates a DEEP COPY. ( assuming that the Country class has a copy constructor that creates one). public class Coin { //data protected Country country; protected String coinName; protected int value; // constructor // default constructor public Coin() { this.country=new Country("US"); this.coinName="Quater"; this.value=25; } //parametirezed constructor public Coin(Country where,String theName,int theValue) {
  • 2. this.country=where; this.coinName=theName; this.value=theValue; } //copy constructor public Coin(Coin another) { } //methods //getValue()-returns its value public int getValue() { return value; } //toString-returns its String representation public String tostring() { return coinName+"with value"+value; }
  • 3. } Solution // Copy constructor modified public Coin(Coin another) { this.country=new Country(another.country); // call to the copy Constructor of Country class this.coinName=another.coinName; // assigns instance member coinName of another object to coinName of //current object this.value=another.value; // assigns instance member value of another object to value of current object }