Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

IIJ A gallery needs to keep track of its paintings and photographs. It keeps at most 120 art works on its walls. Each one is

image text in transcribed
IIJ A gallery needs to keep track of its paintings and photographs. It keeps at most 120 art works on its walls. Each one is described by the following information: enum Medium foil, watercolor, pastel, acrylic, print,color photo, black and white photo);: Room where it is hung enum Room (main, green, blue, north, south, entry, balcony); artist(string) title(string) medium(Medium) Size(struct) height(int) width(int) room(Room) price (float) Write a declaration for a struct that represents a piece of art, call it ArtWork Write an additional declaration of a named array that holds the list of all the art works in the gallery. Call it currentList Lastly, declare an int variable numPieces. The numPieces variable contains the number of pieces represented in the array. 1. 2. 3. V u Write expressions that retrieve the following values from the array declared in question IIZ 1. The 37th work of art 2. The title of the 12th work of art. 3. The width of the 85th work of art. 4. The room for the 120h work of art. 5. The first letter of the artist's name for the 78th work of art. 6. Write a loop that prints a list of the artist, title, and price for every work in the gallery 7. Write a code segment that sums the prices of the works in the gallery 8. Write a code segment that outputs the titles of the works in the blue room of the gallery. 9. Write a code segment that sums the prices of the oil paintings in the gallery that are larger than 400 square inches in size

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

Identify the advantages and disadvantages of written messages.

Answered: 1 week ago