SlideShare una empresa de Scribd logo
1 de 2
Descargar para leer sin conexión
Buy here:
http://theperfecthomework.com/cmsc-335-homework-3/
1. (10 pts) What events do the following components generate:
JButton
JTextField
JComboBox
2. (10 pts) What methods does JTable implement which are required by the interfaces
implemented by the JTable class beyond those interfaces implemented by the various
parent classes of JTable?
3. (10 pts) Address how the differences among these various layout managers, focusing on
their behavior as their container is resized:
a.FlowLayout
b.GridLayout
c.BorderLayout
d.GridBagLayout
e.Absolute Positioning (explain the basic steps required for this manager as well)
4. (10 pts) (Ex 1.8.2) The dining philosophers problem was invented by E. W. Dijkstra, a
concurrency pioneer, to clarify the notions of deadlock and starvation freedom. Imagine five
philosophers who spend their lives just thinking and feasting. They sit around a circular table
with five chairs. The table has a big plate of rice. However, there are only five chopsticks (in
the original formulation forks) available, as shown in Fig. 1.5. Each philosopher thinks. When
he gets hungry, he sits down and picks up the two chopsticks that are closest to him. If a
philosopher can pick up both chopsticks, he can eat for a while. After a philosopher finishes
eating, he puts down the chopsticks and again starts to think.
5 Dining Philosophers
a. What is wrong with everybody doing the following - other than that the philosophers never
get up from the table?
1.think for a while
2.get left chopstick
3.get right chopstick
4.eat for a while
5.return left chopstick
6.return right chopstick
7.return to 1
b. How can the above be fixed to avoid deadlocks?
c. Is your solution starvation free? Literally!
5. (20 pts) What imports and methods need to be added to the Filter class (Figure 2.7) to
allow the code to compile? What are reasonable implementations requirements of those
methods in this class? (See Herlihy and Shavit Chapter 2)
6. (00 pts) NOTE: The issues with the code in Figure 2.9 are the same ones as those in
Figure 2.7, so this problem is really the same as problem 5. Do that one and ignore this
second one.
+++++++ What imports and methods need to be added to the Bakery class (Figure 2.9) to
allow the code to compile? What are reasonable implementations requirements of those
methods in this class? (See Herlihy and Shavit Chapter 2)
7. (10 pts) In Figure 2.12, the Bounded Timestamp System, what denotations (patterns) are
used in T4? In T4, how are 020 and 120 related? How many threads can be labeled in TN?
(See Herlihy and Shavit Chapter 2)
8. (10 pts) Explain what the JVM does when it encounters a synchronized directive. Hint:
consider carefully what is synchronized.
9. (10 pts) What happens when the JVM encounters a wait () call?
10. (10 pts) Describe the environment in which a wait () call is legal?

Más contenido relacionado

Similar a CMSC 335 HOMEWORK 3

Smu bscit sem 2 fall 2014 assignments
Smu bscit sem 2 fall 2014 assignmentsSmu bscit sem 2 fall 2014 assignments
Smu bscit sem 2 fall 2014 assignmentssmumbahelp
 
SMU BSCIT SUMMER 2014 ASSIGNMENTS
SMU BSCIT SUMMER 2014 ASSIGNMENTSSMU BSCIT SUMMER 2014 ASSIGNMENTS
SMU BSCIT SUMMER 2014 ASSIGNMENTSsolved_assignments
 
[Question Paper] Advanced Java (75:25 Pattern) [November / 2016]
[Question Paper] Advanced Java (75:25 Pattern) [November / 2016][Question Paper] Advanced Java (75:25 Pattern) [November / 2016]
[Question Paper] Advanced Java (75:25 Pattern) [November / 2016]Mumbai B.Sc.IT Study
 
Dat 305 dat305 dat 305 education for service uopstudy.com
Dat 305 dat305 dat 305 education for service   uopstudy.comDat 305 dat305 dat 305 education for service   uopstudy.com
Dat 305 dat305 dat 305 education for service uopstudy.comULLPTT
 
Alexandermanalastas reviewer
Alexandermanalastas reviewerAlexandermanalastas reviewer
Alexandermanalastas reviewerSandoy Manalastas
 
Dervy bis 155 week 5 quiz new
Dervy   bis 155 week 5 quiz newDervy   bis 155 week 5 quiz new
Dervy bis 155 week 5 quiz newkxipvscsk02
 
Data Warehousing (May – 2016) [75:25 Pattern | Question Paper]
Data Warehousing (May – 2016) [75:25 Pattern | Question Paper]Data Warehousing (May – 2016) [75:25 Pattern | Question Paper]
Data Warehousing (May – 2016) [75:25 Pattern | Question Paper]Mumbai B.Sc.IT Study
 
[Question Paper] ASP.NET With C# (60:40 Pattern) [October / 2013]
[Question Paper] ASP.NET With C# (60:40 Pattern) [October / 2013][Question Paper] ASP.NET With C# (60:40 Pattern) [October / 2013]
[Question Paper] ASP.NET With C# (60:40 Pattern) [October / 2013]Mumbai B.Sc.IT Study
 
Dervy bis-155-week-2-quiz-new
Dervy bis-155-week-2-quiz-newDervy bis-155-week-2-quiz-new
Dervy bis-155-week-2-quiz-newindividual484
 
[Question Paper] Advanced Java (75:25 Pattern) [April / 2015]
[Question Paper] Advanced Java (75:25 Pattern) [April / 2015][Question Paper] Advanced Java (75:25 Pattern) [April / 2015]
[Question Paper] Advanced Java (75:25 Pattern) [April / 2015]Mumbai B.Sc.IT Study
 
Winter drive assignments sem 2
Winter drive assignments sem 2Winter drive assignments sem 2
Winter drive assignments sem 2solved_assignments
 
Soller my excel reviewer slideshare
Soller my excel reviewer slideshareSoller my excel reviewer slideshare
Soller my excel reviewer slideshareKevin Andrew Soller
 
Alinaaquino my excel reviewer
Alinaaquino my excel reviewerAlinaaquino my excel reviewer
Alinaaquino my excel reviewerNi Aquino
 
[Question Paper] ASP.NET With C# (75:25 Pattern) [November / 2016]
[Question Paper] ASP.NET With C# (75:25 Pattern) [November / 2016][Question Paper] ASP.NET With C# (75:25 Pattern) [November / 2016]
[Question Paper] ASP.NET With C# (75:25 Pattern) [November / 2016]Mumbai B.Sc.IT Study
 
[Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2016]
[Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2016][Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2016]
[Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2016]Mumbai B.Sc.IT Study
 
Advanced Java (Revised Syllabus) [QP / May - 2016]
Advanced Java (Revised Syllabus) [QP / May - 2016]Advanced Java (Revised Syllabus) [QP / May - 2016]
Advanced Java (Revised Syllabus) [QP / May - 2016]Mumbai B.Sc.IT Study
 

Similar a CMSC 335 HOMEWORK 3 (20)

Smu bscit sem 2 fall 2014 assignments
Smu bscit sem 2 fall 2014 assignmentsSmu bscit sem 2 fall 2014 assignments
Smu bscit sem 2 fall 2014 assignments
 
SMU BSCIT SUMMER 2014 ASSIGNMENTS
SMU BSCIT SUMMER 2014 ASSIGNMENTSSMU BSCIT SUMMER 2014 ASSIGNMENTS
SMU BSCIT SUMMER 2014 ASSIGNMENTS
 
[Question Paper] Advanced Java (75:25 Pattern) [November / 2016]
[Question Paper] Advanced Java (75:25 Pattern) [November / 2016][Question Paper] Advanced Java (75:25 Pattern) [November / 2016]
[Question Paper] Advanced Java (75:25 Pattern) [November / 2016]
 
Dat 305 dat305 dat 305 education for service uopstudy.com
Dat 305 dat305 dat 305 education for service   uopstudy.comDat 305 dat305 dat 305 education for service   uopstudy.com
Dat 305 dat305 dat 305 education for service uopstudy.com
 
Alexandermanalastas reviewer
Alexandermanalastas reviewerAlexandermanalastas reviewer
Alexandermanalastas reviewer
 
Dervy bis 155 week 5 quiz new
Dervy   bis 155 week 5 quiz newDervy   bis 155 week 5 quiz new
Dervy bis 155 week 5 quiz new
 
Data Warehousing (May – 2016) [75:25 Pattern | Question Paper]
Data Warehousing (May – 2016) [75:25 Pattern | Question Paper]Data Warehousing (May – 2016) [75:25 Pattern | Question Paper]
Data Warehousing (May – 2016) [75:25 Pattern | Question Paper]
 
Bscit spring driveassignments
Bscit spring driveassignmentsBscit spring driveassignments
Bscit spring driveassignments
 
[Question Paper] ASP.NET With C# (60:40 Pattern) [October / 2013]
[Question Paper] ASP.NET With C# (60:40 Pattern) [October / 2013][Question Paper] ASP.NET With C# (60:40 Pattern) [October / 2013]
[Question Paper] ASP.NET With C# (60:40 Pattern) [October / 2013]
 
Dervy bis-155-week-2-quiz-new
Dervy bis-155-week-2-quiz-newDervy bis-155-week-2-quiz-new
Dervy bis-155-week-2-quiz-new
 
[Question Paper] Advanced Java (75:25 Pattern) [April / 2015]
[Question Paper] Advanced Java (75:25 Pattern) [April / 2015][Question Paper] Advanced Java (75:25 Pattern) [April / 2015]
[Question Paper] Advanced Java (75:25 Pattern) [April / 2015]
 
Winter drive assignments sem 2
Winter drive assignments sem 2Winter drive assignments sem 2
Winter drive assignments sem 2
 
Soller my excel reviewer slideshare
Soller my excel reviewer slideshareSoller my excel reviewer slideshare
Soller my excel reviewer slideshare
 
Alinaaquino my excel reviewer
Alinaaquino my excel reviewerAlinaaquino my excel reviewer
Alinaaquino my excel reviewer
 
[Question Paper] ASP.NET With C# (75:25 Pattern) [November / 2016]
[Question Paper] ASP.NET With C# (75:25 Pattern) [November / 2016][Question Paper] ASP.NET With C# (75:25 Pattern) [November / 2016]
[Question Paper] ASP.NET With C# (75:25 Pattern) [November / 2016]
 
7th semester Computer Science and Information Science Engg (2013 December) Qu...
7th semester Computer Science and Information Science Engg (2013 December) Qu...7th semester Computer Science and Information Science Engg (2013 December) Qu...
7th semester Computer Science and Information Science Engg (2013 December) Qu...
 
[Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2016]
[Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2016][Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2016]
[Question Paper] ASP.NET With C# (75:25 Pattern) [April / 2016]
 
5th Semester (June; July-2015) Computer Science and Information Science Engin...
5th Semester (June; July-2015) Computer Science and Information Science Engin...5th Semester (June; July-2015) Computer Science and Information Science Engin...
5th Semester (June; July-2015) Computer Science and Information Science Engin...
 
EXCEL REVIEWER
EXCEL REVIEWEREXCEL REVIEWER
EXCEL REVIEWER
 
Advanced Java (Revised Syllabus) [QP / May - 2016]
Advanced Java (Revised Syllabus) [QP / May - 2016]Advanced Java (Revised Syllabus) [QP / May - 2016]
Advanced Java (Revised Syllabus) [QP / May - 2016]
 

Más de HamesKellor

CMST 290 FINAL EXAM
CMST 290 FINAL EXAMCMST 290 FINAL EXAM
CMST 290 FINAL EXAMHamesKellor
 
CMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDYCMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDYHamesKellor
 
CMSC 350 PROJECT 3
CMSC 350 PROJECT 3CMSC 350 PROJECT 3
CMSC 350 PROJECT 3HamesKellor
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4 CMSC 350 PROJECT 4
CMSC 350 PROJECT 4 HamesKellor
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4CMSC 350 PROJECT 4
CMSC 350 PROJECT 4HamesKellor
 
CMSC 350 PROJECT 1
CMSC 350 PROJECT 1CMSC 350 PROJECT 1
CMSC 350 PROJECT 1HamesKellor
 
CMSC 350 FINAL PROJECT
CMSC 350 FINAL PROJECTCMSC 350 FINAL PROJECT
CMSC 350 FINAL PROJECTHamesKellor
 
CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2HamesKellor
 
CMSC 350 HOMEWORK 3
CMSC 350 HOMEWORK 3CMSC 350 HOMEWORK 3
CMSC 350 HOMEWORK 3HamesKellor
 
CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1HamesKellor
 
CMSC 330 PROJECT 1
CMSC 330 PROJECT 1CMSC 330 PROJECT 1
CMSC 330 PROJECT 1HamesKellor
 
CMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECTCMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECTHamesKellor
 
CMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPERCMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPERHamesKellor
 
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSALCMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSALHamesKellor
 
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSALCMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSALHamesKellor
 
CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.HamesKellor
 
CMIT 370 FINAL EXAM
CMIT 370 FINAL EXAMCMIT 370 FINAL EXAM
CMIT 370 FINAL EXAMHamesKellor
 
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAMCMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAMHamesKellor
 

Más de HamesKellor (20)

CMST 290 FINAL EXAM
CMST 290 FINAL EXAMCMST 290 FINAL EXAM
CMST 290 FINAL EXAM
 
CMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDYCMST 301 PROJECT 1 CASE STUDY
CMST 301 PROJECT 1 CASE STUDY
 
CMSC 350 PROJECT 3
CMSC 350 PROJECT 3CMSC 350 PROJECT 3
CMSC 350 PROJECT 3
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4 CMSC 350 PROJECT 4
CMSC 350 PROJECT 4
 
CMSC 350 PROJECT 4
CMSC 350 PROJECT 4CMSC 350 PROJECT 4
CMSC 350 PROJECT 4
 
CMSC 350 PROJECT 1
CMSC 350 PROJECT 1CMSC 350 PROJECT 1
CMSC 350 PROJECT 1
 
CMSC 350 FINAL PROJECT
CMSC 350 FINAL PROJECTCMSC 350 FINAL PROJECT
CMSC 350 FINAL PROJECT
 
CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2CMSC 350 HOMEWORK 2
CMSC 350 HOMEWORK 2
 
CMSC 350 HOMEWORK 3
CMSC 350 HOMEWORK 3CMSC 350 HOMEWORK 3
CMSC 350 HOMEWORK 3
 
CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1CMSC 350 HOMEWORK 1
CMSC 350 HOMEWORK 1
 
CMSC 330 PROJECT 1
CMSC 330 PROJECT 1CMSC 330 PROJECT 1
CMSC 330 PROJECT 1
 
CMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECTCMSC 335 FINAL PROJECT
CMSC 335 FINAL PROJECT
 
CMSC 330 QUIZ 4
CMSC 330 QUIZ 4CMSC 330 QUIZ 4
CMSC 330 QUIZ 4
 
CMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPERCMIT 425 RISK ASSESSMENT PAPER
CMIT 425 RISK ASSESSMENT PAPER
 
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSALCMIT 391 LINUX IMPLEMENTATION PROPOSAL
CMIT 391 LINUX IMPLEMENTATION PROPOSAL
 
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSALCMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
CMIT/265 FINAL PROJECT NETWORK DESIGN PROPOSAL
 
CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.CMIT 321 WEEK 2 QUIZ.
CMIT 321 WEEK 2 QUIZ.
 
CMIT 370 FINAL EXAM
CMIT 370 FINAL EXAMCMIT 370 FINAL EXAM
CMIT 370 FINAL EXAM
 
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAMCMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
CMIT 350 FINAL EXAM CCNA CERTIFICATION PRACTICE EXAM
 
CMIT 321 QUIZ 4
CMIT 321 QUIZ 4CMIT 321 QUIZ 4
CMIT 321 QUIZ 4
 

Último

M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Centuryrwgiffor
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxAndy Lambert
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangaloreamitlee9823
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMANIlamathiKannappan
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayNZSG
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableDipal Arora
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfAmzadHosen3
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...amitlee9823
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesDipal Arora
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756dollysharma2066
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsP&CO
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Neil Kimberley
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with CultureSeta Wicaksana
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxWorkforce Group
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageMatteo Carbone
 

Último (20)

M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Famous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st CenturyFamous Olympic Siblings from the 21st Century
Famous Olympic Siblings from the 21st Century
 
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabiunwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
unwanted pregnancy Kit [+918133066128] Abortion Pills IN Dubai UAE Abudhabi
 
Monthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptxMonthly Social Media Update April 2024 pptx.pptx
Monthly Social Media Update April 2024 pptx.pptx
 
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Greater Kailash ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Hebbal Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
A DAY IN THE LIFE OF A SALESMAN / WOMAN
A DAY IN THE LIFE OF A  SALESMAN / WOMANA DAY IN THE LIFE OF A  SALESMAN / WOMAN
A DAY IN THE LIFE OF A SALESMAN / WOMAN
 
It will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 MayIt will be International Nurses' Day on 12 May
It will be International Nurses' Day on 12 May
 
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service AvailableCall Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
Call Girls Pune Just Call 9907093804 Top Class Call Girl Service Available
 
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pillsMifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
Mifty kit IN Salmiya (+918133066128) Abortion pills IN Salmiyah Cytotec pills
 
John Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdfJohn Halpern sued for sexual assault.pdf
John Halpern sued for sexual assault.pdf
 
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
Call Girls Electronic City Just Call 👗 7737669865 👗 Top Class Call Girl Servi...
 
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best ServicesMysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
Mysore Call Girls 8617370543 WhatsApp Number 24x7 Best Services
 
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Majnu Ka Tilla, Delhi Contact Us 8377877756
 
Value Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and painsValue Proposition canvas- Customer needs and pains
Value Proposition canvas- Customer needs and pains
 
Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023Mondelez State of Snacking and Future Trends 2023
Mondelez State of Snacking and Future Trends 2023
 
Organizational Transformation Lead with Culture
Organizational Transformation Lead with CultureOrganizational Transformation Lead with Culture
Organizational Transformation Lead with Culture
 
Cracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptxCracking the Cultural Competence Code.pptx
Cracking the Cultural Competence Code.pptx
 
Insurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usageInsurers' journeys to build a mastery in the IoT usage
Insurers' journeys to build a mastery in the IoT usage
 

CMSC 335 HOMEWORK 3

  • 1. Buy here: http://theperfecthomework.com/cmsc-335-homework-3/ 1. (10 pts) What events do the following components generate: JButton JTextField JComboBox 2. (10 pts) What methods does JTable implement which are required by the interfaces implemented by the JTable class beyond those interfaces implemented by the various parent classes of JTable? 3. (10 pts) Address how the differences among these various layout managers, focusing on their behavior as their container is resized: a.FlowLayout b.GridLayout c.BorderLayout d.GridBagLayout e.Absolute Positioning (explain the basic steps required for this manager as well) 4. (10 pts) (Ex 1.8.2) The dining philosophers problem was invented by E. W. Dijkstra, a concurrency pioneer, to clarify the notions of deadlock and starvation freedom. Imagine five philosophers who spend their lives just thinking and feasting. They sit around a circular table with five chairs. The table has a big plate of rice. However, there are only five chopsticks (in the original formulation forks) available, as shown in Fig. 1.5. Each philosopher thinks. When he gets hungry, he sits down and picks up the two chopsticks that are closest to him. If a philosopher can pick up both chopsticks, he can eat for a while. After a philosopher finishes eating, he puts down the chopsticks and again starts to think. 5 Dining Philosophers a. What is wrong with everybody doing the following - other than that the philosophers never get up from the table? 1.think for a while 2.get left chopstick 3.get right chopstick 4.eat for a while 5.return left chopstick 6.return right chopstick 7.return to 1 b. How can the above be fixed to avoid deadlocks? c. Is your solution starvation free? Literally!
  • 2. 5. (20 pts) What imports and methods need to be added to the Filter class (Figure 2.7) to allow the code to compile? What are reasonable implementations requirements of those methods in this class? (See Herlihy and Shavit Chapter 2) 6. (00 pts) NOTE: The issues with the code in Figure 2.9 are the same ones as those in Figure 2.7, so this problem is really the same as problem 5. Do that one and ignore this second one. +++++++ What imports and methods need to be added to the Bakery class (Figure 2.9) to allow the code to compile? What are reasonable implementations requirements of those methods in this class? (See Herlihy and Shavit Chapter 2) 7. (10 pts) In Figure 2.12, the Bounded Timestamp System, what denotations (patterns) are used in T4? In T4, how are 020 and 120 related? How many threads can be labeled in TN? (See Herlihy and Shavit Chapter 2) 8. (10 pts) Explain what the JVM does when it encounters a synchronized directive. Hint: consider carefully what is synchronized. 9. (10 pts) What happens when the JVM encounters a wait () call? 10. (10 pts) Describe the environment in which a wait () call is legal?