Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In Java Programming Language This exercise will use an interface to draw a framed graphic to the console. The frame consists of a characters: a
In Java Programming Language
This exercise will use an interface to draw a framed graphic to the console. The frame consists of a characters: a framing character and a fill character. For example, if the framing character is x and the fill character is #, a frame may appear as: XXXXX X## x x XXXXX Note that this frame has a dimension of 3 columns and 2 rows surrounded by the framing character. Your interface must provide for all four pieces (framing character, fill character, columns, and rows) as by changing the values of this data will allow the drawing of different frames. As a second example, if the following values: framing character: $ fill character: columns: 4 rows: 3 The following frame must appear: $$$ $$$ $****$ $***** $***** $$$$$$ To facillitate this, create an interface named edu.udc.framing.Framel. Framel must include the following 4 methods: public char getFramer(); public char getFiller(); public int getRows(); public int getCols(); Create a public class called edu.udc.cs2.Util. In the Util class create a public static method called drawFrame(Framel). The drawFrame method must be written so that the table is output according to the values in the Framel parameter. The only classes required to turn in are Framel and Util. To test your code, you will create a class to implement the Framel interface. You do not need to turn in such a class. My tests will implment your Framel interface as well as test the drawFrame method. Ensure you spell the methods and classes correctly along with the package names. This exercise will use an interface to draw a framed graphic to the console. The frame consists of a characters: a framing character and a fill character. For example, if the framing character is x and the fill character is #, a frame may appear as: XXXXX X## x x XXXXX Note that this frame has a dimension of 3 columns and 2 rows surrounded by the framing character. Your interface must provide for all four pieces (framing character, fill character, columns, and rows) as by changing the values of this data will allow the drawing of different frames. As a second example, if the following values: framing character: $ fill character: columns: 4 rows: 3 The following frame must appear: $$$ $$$ $****$ $***** $***** $$$$$$ To facillitate this, create an interface named edu.udc.framing.Framel. Framel must include the following 4 methods: public char getFramer(); public char getFiller(); public int getRows(); public int getCols(); Create a public class called edu.udc.cs2.Util. In the Util class create a public static method called drawFrame(Framel). The drawFrame method must be written so that the table is output according to the values in the Framel parameter. The only classes required to turn in are Framel and Util. To test your code, you will create a class to implement the Framel interface. You do not need to turn in such a class. My tests will implment your Framel interface as well as test the drawFrame method. Ensure you spell the methods and classes correctly along with the package namesStep 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