RedCross.java
/* 
 *program to paint a red  cross in the context of the non representational painting world, npw 
 * 
 */
package npw;

import java.awt.Color;
import java.util.Objects;
import javax.swing.SwingUtilities;
import painter.SPainter;
import shapes.SRectangle;


public class RedCross {
    //solution to red cross problem
    private void paintTheImage(){
        SPainter painter = new SPainter("Red Cross" , 600 , 600);
        SRectangle rectangle = new SRectangle(500, 100);
        painter.setColor(Color.RED);
        painter.paint(rectangle);
        rectangle.setHeight(100); rectangle.setWidth(500);
        painter.paint(rectangle);
    }

    //required infrastructure
    public RedCross(){
        paintTheImage();
    }

    public static void main(String[] args){
        SwingUtilities.invokeLater(new Runnable() {
            @Override
            public void run() {
                new RedCross();
            }
        });
    }
}