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      

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

1 Expert Approved Answer
Step: 1 Unlock

a Two field attributes for this class and their types are BName String BWeigh... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!