Question: please answer this assignment using Java langauge. thanks The Problem A museum has a number of rooms, each of which has several wall Paintings are

please answer this assignment using Java langauge. thanks  please answer this assignment using Java langauge. thanks The Problem A
museum has a number of rooms, each of which has several wall

The Problem A museum has a number of rooms, each of which has several wall Paintings are exhibited on some or all the walls. Your task is to represent this system in object-oriented manner The museum, cach room, each wall, and each painting has a name and each is represented in sottware by a class. This common property of the name is encapslated in a super class med Entity, this class has a public constructor that takes the name of the entity as its cely parameter All other classes (Museum, Room, Wor, and pointing are subclasses of Your system will thus have classes named Museum, Room Wall Pantins. Entity. The classes should be structured as shown below 1. A field to store the rooms 2. A constructor that sets the name 3. A method that returns a list (java.util) of Painting byacts in the 4. A method to add a Room object. This method has a parameter for the name of the room and creates and returns the room object created Room 1. A field to store the walls 2. A constructor that sets the name 3. A method that retumsa s java.util) of Pointing objects displayed this room 4. A method to add a wall object. This method has a parameter for the name of the wall and creates and returns the Wolf object created 1. A field to store the paintings on this wall 2. A constructor that sets the name 3. A method that retums ist java.util) of Pointing objects displayed on the wall 4. A method to add a Painting object: this is called from the method item2listed under Pointing Fating 1. A constructor that sets the name 2. A method to set the wall on which this painting is displayed, this calls the method item 4) listed under Woll You will have to everride tostrinet) appropriately, throughout Lise generics wherever applicable A Minimal Test The following code shows an idea of the expected functionality. Please remember that I will exercise your program with a more extensive test public static void main(Stringt args{ Museum museus new Museumi: Roon rool nuseun.addRoon): Roon roon2 museum.addRoont"-2) Painting pointing = new Painting "): Painting painting = new Painting?*); wall walli roon.addwall) wall wal12 ron 2. addwall"); painting.se A Minimal Test 3 of 4 g code shows an idea of the expected functionality. Please remember that I will program with a more extensive test. public static void main(String[] args) { Museum museum = new Museum ("M1"); Room roon = museum.addRoon("r"): Room roon2 = museum.addRoon{"r2"); Painting painting1 = new Painting("p1"); Painting painting2 = new Painting("p2"); Wall walli = rooml.addwall("1"); Wall wall2 = roon.addwall?"2"); paintingi.setwall(wal 11); painting2.setwall(wall2); System.out.println(walli.getPaintings()); System.out.println(wal 12.getPaintings()); System.out.println(room.getPaintings()); System.out.println(roon2.getPaintings()); System.out.println(museum.getPaintings()); } It produced the following output. IPainting pl on wall wil [Painting p2 on wall w21 [Painting pl on wall wil (Painting p2 on watt w2] [Painting p1 on watt wi, Painting p2 on wall 21 Documentation and Coding Conventions Follow the requirements described in the coding standards document undet Assignments on D2L. Every class should be in a separate java file. Don't forget to document the constructors. Also, document the parameters and return values If a method simply sets a field in the class or gets the value of a field in the class, it need not be documented. Notice the highlighted phrases. For example, in Room, the following method is not a getter. A method that returns a List (java.util) of Painting objects displayed in this room If a method overrides a superclass method, put the annotation @Override in front of that method. If you specify this annotation, there is no need to document the method. Do not abbreviate any words except names of Exception objects (formed by using the first letter of each word in the Exception class) or the parameter to main (args). Do NOT use single letter identifiers such as i and je

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!