Exercise 1.2
- Add a constructor to the following partial class definition and draw the class diagram
// represent computer images
class Image \{
int height; // pixels
int width; // pixels
String source; // file name
String quality; // informal
()
Explain what the expressions mean in the problem context and write test class:
new Image(5, 10, "small.gif", "low")
new Image(120, 200, "med.gif", "low")
new Image(1200, 1000, "large.gif", "high")