Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribedIn 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 names

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

Give an example of a. A nitrile b. a b- a keto b-diester

Answered: 1 week ago

Question

Compare levels of resolution in conflict outcomes?

Answered: 1 week ago