INF 2611
VISUAL PROGRAMMING II
GROUP PREPARATION QUIZ
EXAM 2020
, lOMoARcPSD|8112944
INF2611 Group 1E Exam Preparation Quiz 1
(INF2611_2020_S2-G1E)
1. What are widgets and why are they useful in programming? (2 Points)
The main component for creating a user interface are widgets, such as buttons, menus and scrollbars. They are used for
receiving user input but also to display data and status information. Widgets can also be nested inside another.
2. Name any 3 widgets that you have used in your assignments. (3 Points)
You used among others these widgets:
Clock widget
Calendar
Displaying information in a table
Displaying graphics
3. Explain how you would add a LCD widget and how you can use this to show the system time. (5
Points)
To use the Clock widget you use the methods:
Use the setMode() method, to change the base of the numbers. Available options are Hex, Dec, Oct, Bin.
Use the display() method to display the content as LCD digits.
Use the value() method that can return the numerical value displayed by the LCD Number widget.
For the system clock time displayed, to update automatically, you are required to implement timers.
4. Explain how you would add a calendar widget and how you can use this to display the date
selected in a date edit widget. (3 Points)
To use the calendar widget you use the methods:
Use method selectedDate() that returns the currently selected date.
Use method monthShown() that return the currently displayed month.
Use method yearShown() that returns the currently selected year.
Use method setFirstDayOfWeek() to set the day in the first column.
Use method selectionChanged() when you select a date other than the selected date.(example selecting date by mouse or
keyboard).
You can change various properties in the Calendar Widget such as minimumDate, maximumDate, selectionMode etc.
5. Why is a combobox useful in applications? (1 Point)
Combobox is an input widget, that displays a pop-up list. It forces the user to use only values available in the pop-up
list. Which means it controls user input and ensures validity and accuracy of input.
6. Explain how you can use a combo box in a GUI. (3 Points)
You can use a combo box to display listed items.
You can use it to change an item.
Remove an item
Add an item to the list
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller JayJo. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $5.50. You're not tied to anything after your purchase.