Looking for help setting-up a Java class, with the following requirements:
- Class Painting, which is a subclass of Class Artwork
- Instance variables
- paintType: String type // oil, watercolor, etc.
- material: String type // material it is drawn on, such as paper, canvas, wood, etc.
- A constructor
- Painting (String id, String artist, int year, String location, String paintType, String material)
- Input parameter: id, artist, year, location, paintType, material
- Precondition:
- year is a positive integer
- Postcondition: A new Painting object with given attributes has been created.
- Methods
- getPaintType( )
- nput parameter: None
- Output: The paintType of the painting
- getMaterial( )
- Input parameter: None
- Output: The material of the painting
- setPaintType(String paintType)
- Input parameter: paintType
- Output: None
- Postcondition: The paintType of the painting was set to the given paintType.
- setMaterial(String material)
- Input parameter: material
- Output: None
- Postcondition: The material of the painting was set to the given material.