Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

pleaae help with these two... QUESTION 12 Create a class called Fish with the following variables (4) Type of fish . . Weight in whole

image text in transcribed

image text in transcribed

pleaae help with these two...

QUESTION 12 Create a class called Fish with the following variables (4) Type of fish . . Weight in whole ounces . Length in fractional inches. Write a default constructor for the class. (2) Write a constructor where the values are being passed in (3) Write the get and set for just the variable weight of the fish (NOT for the other two variables). (4) Write a method called public double calculatePrice( double price) which calculates the price of the fish by multiplying the weight of the fish by the price. (3) b)Write another class called FishApp which has the main. Create an object for the fish where type is Salmon, weight is 64 ounces and length is 1.20 feet Create an input variable for the price and ask the user to input the price and call the method calculatePrice to calculate the price of the fish (10 points) T T T Paragraph Arial

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions

Question

d. Would you implement the new control algorithm?

Answered: 1 week ago

Question

1. Are my sources credible?

Answered: 1 week ago

Question

3. Are my sources accurate?

Answered: 1 week ago

Question

1. Is it a topic you are interested in and know something about?

Answered: 1 week ago