Last condition is not satisfying
package com.codegym.task.task16.task1631;
import com.codegym.task.task16.task1631.common.ImageReader;
import com.codegym.task.task16.task1631.common.ImageTypes;
import com.codegym.task.task16.task1631.common.*;
/*
Requirements:
1. Create a JpgReader class in the common package. It must implement the ImageReader interface.
2. Create a PngReader class in the common package. It must implement the ImageReader interface.
3. Create a BmpReader class in the common package. It must implement the ImageReader interface.
4. Create a public class named ImageReaderFactory.
5. Add a public static method getImageReader with an ImageTypes parameter to the ImageReaderFactory
class.
6. The getImageReader method must create and return a suitable Reader.
7. The getImageReader method must throw an IllegalArgumentException if an invalid argument is passed.
*/
public class Solution {
public static void main(String[] args) {
try{
ImageReader reader = ImageReaderFactory.getImageReader(null);
}catch(Exception ex){
ex.printStackTrace();
}
}
}