SlideShare a Scribd company logo
1 of 1
Download to read offline
In the Prado museum in Madrid there is a small seating area where visitors can view Picassos
Guernica. Each visitor must find a seat and may view the painting for as long as they choose.
Your task is to write a class called ViewingStand that manages access to the seats. The class has
two methods: findSeat and leaveSeat. Seats may not be shared by visitors, i.e. two visitors cannot
share the same seat. In the event that a seat is not available a visitor simply continues to check
for one. There is no wait for a seat to become vacant. It is important to optimize the search for a
seat so that multiple visitors can concurrently search for seats. Use a fine-grained approach.
Write a simple simulator in java for your class that uses threads to model visitors.

More Related Content

More from charanjit1717

INTRODUCCI�N Koss Corporation es una empresa de Milwaukee cuyo negoc.pdf
INTRODUCCI�N Koss Corporation es una empresa de Milwaukee cuyo negoc.pdfINTRODUCCI�N Koss Corporation es una empresa de Milwaukee cuyo negoc.pdf
INTRODUCCI�N Koss Corporation es una empresa de Milwaukee cuyo negoc.pdf
charanjit1717
 
Introduction William Clay Ford, Jr., was staring out the window of.pdf
Introduction William Clay Ford, Jr., was staring out the window of.pdfIntroduction William Clay Ford, Jr., was staring out the window of.pdf
Introduction William Clay Ford, Jr., was staring out the window of.pdf
charanjit1717
 
Internal Service Funds - Journal EntriesRequired Book journal en.pdf
Internal Service Funds - Journal EntriesRequired  Book journal en.pdfInternal Service Funds - Journal EntriesRequired  Book journal en.pdf
Internal Service Funds - Journal EntriesRequired Book journal en.pdf
charanjit1717
 
Integrated Health was a large private, nonprofit health care system .pdf
Integrated Health was a large private, nonprofit health care system .pdfIntegrated Health was a large private, nonprofit health care system .pdf
Integrated Health was a large private, nonprofit health care system .pdf
charanjit1717
 
Intellectual Property Fight over Virtual Reality HeadsetThe Ocul.pdf
Intellectual Property Fight over Virtual Reality HeadsetThe Ocul.pdfIntellectual Property Fight over Virtual Reality HeadsetThe Ocul.pdf
Intellectual Property Fight over Virtual Reality HeadsetThe Ocul.pdf
charanjit1717
 
Incidente del caso 2 El compa�ero de Barry se convierte en su jefe.pdf
Incidente del caso 2 El compa�ero de Barry se convierte en su jefe.pdfIncidente del caso 2 El compa�ero de Barry se convierte en su jefe.pdf
Incidente del caso 2 El compa�ero de Barry se convierte en su jefe.pdf
charanjit1717
 
InnoTech Software Contrasting Styles InnoTech Software Solutions (I.pdf
InnoTech Software Contrasting Styles InnoTech Software Solutions (I.pdfInnoTech Software Contrasting Styles InnoTech Software Solutions (I.pdf
InnoTech Software Contrasting Styles InnoTech Software Solutions (I.pdf
charanjit1717
 

More from charanjit1717 (20)

Internal control systems areA. Developed by the Securities and Ex.pdf
Internal control systems areA. Developed by the Securities and Ex.pdfInternal control systems areA. Developed by the Securities and Ex.pdf
Internal control systems areA. Developed by the Securities and Ex.pdf
 
Instrucciones Contesta las preguntas en oraciones completas. Trate .pdf
Instrucciones Contesta las preguntas en oraciones completas. Trate .pdfInstrucciones Contesta las preguntas en oraciones completas. Trate .pdf
Instrucciones Contesta las preguntas en oraciones completas. Trate .pdf
 
Investigue un poco y describa dos o tres escenarios en los que ser�a.pdf
Investigue un poco y describa dos o tres escenarios en los que ser�a.pdfInvestigue un poco y describa dos o tres escenarios en los que ser�a.pdf
Investigue un poco y describa dos o tres escenarios en los que ser�a.pdf
 
Investigue un poco sobre los proveedores de nube personal. �Qu� ti.pdf
Investigue un poco sobre los proveedores de nube personal. �Qu� ti.pdfInvestigue un poco sobre los proveedores de nube personal. �Qu� ti.pdf
Investigue un poco sobre los proveedores de nube personal. �Qu� ti.pdf
 
Investigate the five core missions of DHS and discuss how they promo.pdf
Investigate the five core missions of DHS and discuss how they promo.pdfInvestigate the five core missions of DHS and discuss how they promo.pdf
Investigate the five core missions of DHS and discuss how they promo.pdf
 
Innovation Brewing of Sylva filed a trademark application for the co.pdf
Innovation Brewing of Sylva filed a trademark application for the co.pdfInnovation Brewing of Sylva filed a trademark application for the co.pdf
Innovation Brewing of Sylva filed a trademark application for the co.pdf
 
Instructions1. Create a title slide deck that must include your.pdf
Instructions1. Create a title slide deck that must include your.pdfInstructions1. Create a title slide deck that must include your.pdf
Instructions1. Create a title slide deck that must include your.pdf
 
INTRODUCCI�N Koss Corporation es una empresa de Milwaukee cuyo negoc.pdf
INTRODUCCI�N Koss Corporation es una empresa de Milwaukee cuyo negoc.pdfINTRODUCCI�N Koss Corporation es una empresa de Milwaukee cuyo negoc.pdf
INTRODUCCI�N Koss Corporation es una empresa de Milwaukee cuyo negoc.pdf
 
Introduction William Clay Ford, Jr., was staring out the window of.pdf
Introduction William Clay Ford, Jr., was staring out the window of.pdfIntroduction William Clay Ford, Jr., was staring out the window of.pdf
Introduction William Clay Ford, Jr., was staring out the window of.pdf
 
Intro to ProgrammingExercise 1University_Athletics.pyMake a cl.pdf
Intro to ProgrammingExercise 1University_Athletics.pyMake a cl.pdfIntro to ProgrammingExercise 1University_Athletics.pyMake a cl.pdf
Intro to ProgrammingExercise 1University_Athletics.pyMake a cl.pdf
 
International MARCOM fails and WhyConsider the International Mark.pdf
International MARCOM fails and WhyConsider the International Mark.pdfInternational MARCOM fails and WhyConsider the International Mark.pdf
International MARCOM fails and WhyConsider the International Mark.pdf
 
International Fisher Effect suggests thatGroup of answer choices.pdf
International Fisher Effect suggests thatGroup of answer choices.pdfInternational Fisher Effect suggests thatGroup of answer choices.pdf
International Fisher Effect suggests thatGroup of answer choices.pdf
 
Interiores de galaxiasEstado de Resultados 2011 ($ en Millones) .pdf
Interiores de galaxiasEstado de Resultados 2011 ($ en Millones) .pdfInteriores de galaxiasEstado de Resultados 2011 ($ en Millones) .pdf
Interiores de galaxiasEstado de Resultados 2011 ($ en Millones) .pdf
 
Internal Service Funds - Journal EntriesRequired Book journal en.pdf
Internal Service Funds - Journal EntriesRequired  Book journal en.pdfInternal Service Funds - Journal EntriesRequired  Book journal en.pdf
Internal Service Funds - Journal EntriesRequired Book journal en.pdf
 
Integrated Health was a large private, nonprofit health care system .pdf
Integrated Health was a large private, nonprofit health care system .pdfIntegrated Health was a large private, nonprofit health care system .pdf
Integrated Health was a large private, nonprofit health care system .pdf
 
Intellectual Property Rights allow creators or owners of patents, tr.pdf
Intellectual Property Rights allow creators or owners of patents, tr.pdfIntellectual Property Rights allow creators or owners of patents, tr.pdf
Intellectual Property Rights allow creators or owners of patents, tr.pdf
 
Intellectual Property Fight over Virtual Reality HeadsetThe Ocul.pdf
Intellectual Property Fight over Virtual Reality HeadsetThe Ocul.pdfIntellectual Property Fight over Virtual Reality HeadsetThe Ocul.pdf
Intellectual Property Fight over Virtual Reality HeadsetThe Ocul.pdf
 
Incidente del caso 2 El compa�ero de Barry se convierte en su jefe.pdf
Incidente del caso 2 El compa�ero de Barry se convierte en su jefe.pdfIncidente del caso 2 El compa�ero de Barry se convierte en su jefe.pdf
Incidente del caso 2 El compa�ero de Barry se convierte en su jefe.pdf
 
INRT Software Solutions es una empresa que construye sistemas de inf.pdf
INRT Software Solutions es una empresa que construye sistemas de inf.pdfINRT Software Solutions es una empresa que construye sistemas de inf.pdf
INRT Software Solutions es una empresa que construye sistemas de inf.pdf
 
InnoTech Software Contrasting Styles InnoTech Software Solutions (I.pdf
InnoTech Software Contrasting Styles InnoTech Software Solutions (I.pdfInnoTech Software Contrasting Styles InnoTech Software Solutions (I.pdf
InnoTech Software Contrasting Styles InnoTech Software Solutions (I.pdf
 

Recently uploaded

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
EADTU
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
中 央社
 

Recently uploaded (20)

Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17How to Send Pro Forma Invoice to Your Customers in Odoo 17
How to Send Pro Forma Invoice to Your Customers in Odoo 17
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 
How to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptxHow to Manage Website in Odoo 17 Studio App.pptx
How to Manage Website in Odoo 17 Studio App.pptx
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes GuàrdiaPersonalisation of Education by AI and Big Data - Lourdes Guàrdia
Personalisation of Education by AI and Big Data - Lourdes Guàrdia
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 

In the Prado museum in Madrid there is a small seating area where vi.pdf

  • 1. In the Prado museum in Madrid there is a small seating area where visitors can view Picassos Guernica. Each visitor must find a seat and may view the painting for as long as they choose. Your task is to write a class called ViewingStand that manages access to the seats. The class has two methods: findSeat and leaveSeat. Seats may not be shared by visitors, i.e. two visitors cannot share the same seat. In the event that a seat is not available a visitor simply continues to check for one. There is no wait for a seat to become vacant. It is important to optimize the search for a seat so that multiple visitors can concurrently search for seats. Use a fine-grained approach. Write a simple simulator in java for your class that uses threads to model visitors.