Question: public class CBox { } String BColor = blue; String BName; double BWeight; public void setBColor(String c) { BColor = c; } public String
public class CBox { } String BColor = "blue"; String BName; double BWeight; public void setBColor(String c) { BColor = c; } public String getBName() { } return BName; a) Name any 2 field attribute for this class and their type? b) What is the name of the method that is a mutator? c) Why is the return type for the getBName method String? (2 marks) (2 marks)
Step by Step Solution
There are 3 Steps involved in it
a Two field attributes for this class and their types are BName String BWeigh... View full answer
Get step-by-step solutions from verified subject matter experts
