Write a class called MonetaryCoin that is derived from the Coin class presented in Chapter 5 (the source code for Chapter 5 examples is available via Moodle). [6 pts] Store one integer and one float in the MonetaryCoin that represent its value and weight in grams, respectively. Add a third variable of your choice (related to a coin, of course) and use self-descriptive variable names for all three variables. Pass the values to the constructor in MonetaryCoin and save them to your variables.

Answers

Answer 1

Answer:

Explanation:

The following Java code creates the MonetaryCoin class that extends the Coin class. It then creates three variables representing the MonetaryCoin object which are its value, weight, and coinYear. These are all passed as arguments to the constructor and saved as instance variables.

public class MonetaryCoin extends Coin {

   

   int value;

   float weight;

   int coinYear;

   

   public void MonetaryCoin(int value, float weight, int coinYear) {

       this.value = value;

       this.weight = weight;

       this.coinYear = coinYear;

   }

}


Related Questions

How SPARQL 1.1 has advantage over SPARQL 1.0??​

Answers

SPARQL 1.0 became an official W3C Recommendation on 15 January 2008. On 26 March 2013, the SPARQL Working Group has produced a new W3C Recommendation SPARQL 1.1 that introduces more features to 2008 version. SPARQL is emerging as the de facto RDF query language. Prior to SPARQL, there were some other popular RDF query languages, such as RQL, SeRQL, TRIPLE, RDQL, and so on. The comprehensive...

When identifying who will send a presentation, what are the two types of audiences?

Answers

Answer:

Explanation:Demographic audience analysis focuses on group memberships of audience members. Another element of audience is psychographic information, which focuses on audience attitudes, beliefs, and values. Situational analysis of the occasion, physical setting, and other factors are also critical to effective audience analysis.

5. A restore program generally is included with what type of utility?
O A. Screen saver
O B. Antivirus
O C. Uninstaller
D. Backup

6. The interface that allows interaction with menus, and visual images such as
buttons:
A. Touchscreen user interface
O B. Menu driven Interface
O C. Graphical user interface
O D. Command line interface​

Answers

The answer is B because the rest of them doesn’t make scenes

Using a tag, set the color to green for all tags.

Answers

Answer:

<style>

p {

background-color: rgb(255, 0, 0);

}

h1 {

background-color: rgb(0, 255, 0);

}

ol {

background-color: rgb(97,51,47);

}

</style>

Explanation:

Put this at the top of your code. It should target the paragraph tag, the header h1 tag, and the Ordered List (OL) tag individually and set their background colors respectively.

It's been a while since I've done CSS so you might have to tweak the syntax a bit, but it should look something like that.

63. Name the 4 main lights & and their primary purpose.

Answers

I don’t know this !!

how many stages needed to have powerful amplifier?​

Answers

Power amplifier stages in a real circuit. Circuit diagram of a three stage practical audio power amplifier is shown in the figure below. Small signal transistor Q1 and its associated components form the voltage amplification stage.

Answer:

Generally you should pick an amplifier that can deliver power equal to twice the speaker's program/continuous power rating. This means that a speaker with a “nominal impedance” of 8 ohms and a program rating of 350 watts will require an amplifier that can produce 700 watts into an 8 ohm load.

True or false you cannot get a computer virus is you instal antivirus

Answers

Answer: F

Explanation: There are many ways hackers can get into your computer, and many ways can bypass an antivirus so it is False

This is true because if you instal antivirus is no way the computer get virus then

Which of the following is not part of the four ways you can avoid problems with email communication?
a.
Be brief.
b.
Proofread your message.
C.
Reply right away after you get an email.
d.
Seek other ways to relay your message

Answers

Answer:

d is the correct answer for this problem

Please Fix This For Me


print ("Please enter a number between 1 and 100")
n = input

if = n < 1 and n > 100:

if = (n // 2 == 0):
print (n, "is even")

if = (n // 3 == 0):
print (n, "is odd")

else:
print("You have not entered a number between 1 and 100.")

Answers

Answer:

The correction is as follows:

n = int(input("Please [tex]enter\ a[/tex] [tex]number\ between\ 1[/tex] and 100: "))

if n < 1 or n > 100:

   print("You [tex]have\ not[/tex] entered a [tex]number\ between\ 1[/tex] and 100.")

elif n % 2 == 0:

   print (n, "is even")

else:

   print (n, "is odd")

Explanation:

See attachment for explanation

Consider the following method:
public static String joinTogether(int num, String[] arr)
{
String result = "";
for (String x : arr)
{
result = result + x.substring(0, num);
}
return result;
}

The following code appears in another method in the same class:
String[] words = {"dragon", "chicken", "gorilla"};
int number = 4;
System.out.println(joinTogether(number, words));

What is printed when the code above is executed?
a. dragonchickengorilla
b. drachigor
c. dragchicgori
d. dragochickgoril
e. There is an error in the program, it does not run

Answers

Answer: b.

Explanation:

Other Questions
Please describe how the artists Kandinsky and Mondrian used the formal element of line. Compare and contrast their styles in seven or eight sentences. Which artist used expressive line? Which artist used analytic line? How were outlines, contour lines and implied lines used in these paintings? Which painting is two dimensional, and which painting appears to be three dimensional? Which painting suggests movement? Please help, having a lot of trouble with this Choose the correctly written sentence. *4 pointsThe writer gave the book to my friend and I.The writer give the book to my friend and me.The writer gave the book to we.The writer gave the book to my friend and me. how do occupancy rate and potential gross rate relate Is it true or false .Children are not consumers.Why? What body of water feeds into the Strait of Gibraltar from the west? Which example is an abiotic factor of an aquarium environment?waterbacteriacoralsunfish someone help fast!!please Explain what happened when a new process for tanning buffalo hides was discovered. simplify[tex] {a}^{3} + {b}^{3} [/tex] Find the average rate of change of g(x) =-x+2x+2 from x=2 to x = 6.Simplify your answer as much as possible. Pls help me on this question Recipe for tortitas de carne question ; the three Ingredients for the Salsa What does Allsgat Zum Vatertag mean A cookie jar has 9 chocolate chip cookies, 17 peanut butter cookies, and 17 sugar cookies inside of it. The cookie monster's favorite cookies are chocolate chip cookies. What is the probability that the cookie monster will be disappointed and doesn't get his favorite cookie? Round your answer to the thousandths place. Which event from the text can be described as part of the exposition? Mowgli learns about the rivalry between Bagheera and Shere Khan. Mowgli is described as having grown up over eleven years and had a wonderful life. Mowgli learns about the importance of the laws of the jungle. Mowgli finds out that he may have to face Shere Khan in battle one day. PLEASE HELP thank u very muchMartina designed a painting for art class, as shown in the drawing below. Her design contains 4 circles on a square canvas. Each circle has a radius of 6 inches. The circles touch the edges of the canvas and each other, as show below. The shaded section of Martina's design will be painted black. Which is closest to the area that will be painted black? June runs a little slower than Carlos. She ran 1/4 of a mile in 3 minutes. How long will it take herto run a full mile? Which of the following is a result of cultural diffusion illustrated by the image above? A. Christianity is the most practiced religion in North Africa. B. Islam is the most practiced religion in North Africa. C. Most governments in Africa are unlimited. D. The Sahara Desert is located in North Africa. What was the purpose of the Declaration of Independence