Answered step by step
Verified Expert Solution
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
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 ArialStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started