Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Programming Language Problem the program needs to be written in the NetBeans environment Q2) In the figure given below there are some shapes that
Java Programming Language Problem the program needs to be written in the NetBeans environment
Q2) In the figure given below there are some shapes that don't touch each other. The shape elements can touch each other from edges or corners. You have to write a program and design an algorithm to specify the number of shapes in the given file. The file HW3Q 2.txt will be given as: 1111000000001001100000000000011000000000000001000000000000000000110000000000111100000000001011000001100011110000111100000010001001000000000010010000000000 The output of your program has to define the number of shapes and their shapes explicitly as: The output: There are four shapes Shape 1 Shape 2 Shape 3 Shape 4 * * * * The necessary Interface is given as : public interface HW3 2interface \{ public void read file(string filepath); // read file public string find_figures(); / find and return the shapes public void print_figures(String myfigures); //print figures to the screen public void print_figures_to_file(String myfigures); //print figures to the file \} Your HW3 class has to implement the Interface given above
Step 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