Complete the missing code in the following classes class Hero private int pos: /
ID: 3865406 • Letter: C
Question
Explanation / Answer
public class Hero
{
private int pos;
// Constructor
public Hero()
{
pos=11;
}
}
-------------------------------------------
public Fish
{
private double wight;
//Setter Method for Fish Class
public void setweight(double w)
{
wight=w;
}
}
--------------------------------------------
public class Pen
{
//Properties of Pen class
private String color;
private int ink;
}
---------------------------------------------
public class Account
{
private double balance;
//Deposit Method
public void deposit(double amount)
{
balance=balance+amount;
}
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.