From the course: Java Threads
Unlock the full course today
Join today to access over 24,400 courses taught by industry experts.
Challenge: Webinar polling system - Java Tutorial
From the course: Java Threads
Challenge: Webinar polling system
- [Instructor] It's time for our first challenge. Here, you are using what you've learned so far about Java threads, like creating and starting a thread. In this challenge, I want you to design a simple voting system for a fictitious brand called Topsy-Turvy Bakery. Topsy-Turvy is hosting a wedding cake design webinar for their customers. During this webinar, the audience will vote for the final round of a baking competition. They have three finalists and these are the three designs to choose from. The audience will be given 30 seconds to vote via the voting systems, starting from a given time. At the end of the duration, the wedding cake design that gets the highest number of votes will be the one that wins the competition. Voting and counting are two different parts of execution in the voting program. So there'll be threads that handle votes coming in from the three cake designs and threads that handle counting those…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Thread class and Runnable interface2m 17s
-
(Locked)
Creating a thread: Extending the Thread class4m 4s
-
(Locked)
Creating a thread: Implementing the Runnable interface3m 31s
-
(Locked)
Starting a thread7m
-
(Locked)
Extend a thread or implement a Runnable?2m 27s
-
(Locked)
Challenge: Webinar polling system3m 25s
-
(Locked)
Solution: Webinar polling system3m 33s
-
-
-