Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a) Is the code below tightly coupled if yes provide a reason and implement a loosely coupled working version of it? (7 marks) public
a) Is the code below tightly coupled if yes provide a reason and implement a loosely coupled working version of it? (7 marks) public class classVolume { public static void main(String args[]) { Box b = new Box(5,5,5); System.out.println(k.volume); } } { public class Box public int volume; Box(int length, int width, int height) { this volume = length * width height; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Answer Yes the code provided is tightly coupled because the Volume class directly depends on the Box ...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
Document Format ( 2 attachments)
66430b2fbd458_952808.pdf
180 KBs PDF File
66430b2fbd458_952808.docx
120 KBs Word File
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started