Question: Create in Java the following hierarchy of artifacts. A creation has a serial number (index), a creator and a year which are assigned to him
Create in Java the following hierarchy of artifacts.
A creation has a serial number (index), a creator and a year which are assigned to him from the beginning and remain stable. It also has a function (getInfo) which prints the creator and the creation year of the creation as well as a function (getIndex) which prints only its serial number.
Masterpieces are types of creations that also have information about the movement to which they belong as well as the state in which they are located (condition). This information is assigned to them from the beginning. Movement is one of impressionism, expressionism, naturalism. The situation can be changed by assigning the appropriate value. The prices it gets are bad, good, excellent. Masterpieces are accompanied by a function (getInfo) which uses the getInfo of the creations to print all the information concerns masterpieces.
The masterpieces are distinguished in paintings and sculptures.The paintings additionally have the information of their length and width as well as their technique (technique) which can be one of oil, aquarelle, tempera.All this information is assigned to them from the beginning and remains constant.The paintings accompanied by a function (getInfo) which using getInfo of masterpieces prints all the information that accompanies them as well as the surface it occupies the painting. Also the paintings are accompanied by an evaluation function h which accepts as arguments the movement and state and decides whether a painting is acceptable or not based on whether its characteristics satisfy the given values of the arguments.
The condition may not be given, in which case the value is considered good. The condition excellent is accepted and in case the value specified is good. The sculptures have, in addition to their information as masterpieces, also its information volume they occupy volume and their material The material can be one iron, stone, wood..The sculptures are accompanied by a function (getInfo) which with use of getInfo masterpieces prints all the information that accompanies them. Also the sculptures are accompanied by an evaluate function which accepts as arguments movement and condition and states whether a sculpture is acceptable or not based on whether the features satisfy the given values of the arguments. The condition may not be given, so in this case the price is considered excellent. If the value is specified as good, the value iexcellent is not acceptable.
The construction functions of the classes that you will implement to print messages of the form Creating an instance of (class)....
Implement an auction function that accepts as arguments an array of creations, a movement value, and a condition value . For each of these creations: 1. print its serial number, 2. print the data using the getInfo function, 3. print the result of the evaluate function for this creation, according to the values of the attributes given as arguments in the auction function.
To have a complete program, implement a main function which creates random N objects from the classes you will implement, with random initializations and call the auction function with arguments for all of these items as well as prices for movement and condition. N as well as movement and condition values to be given from the command line. (Note: creators can be represented by strings CreatorI where I is an integer.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
