Visual Basic Questions and Answers – Adding a GroupBox to the Form and Using Financial.Pmt Method

«
»

This set of Visual Basic Questions and Answers for Experienced people focuses on “Adding a GroupBox to the Form and Using Financial.Pmt Method”.

1. __________ is used to add a GroupBox to the interface.
a) GroupBox tool
b) Group tool
c) Properties Window
d) View Window
View Answer

Answer: a
Explanation: A GroupBox tool is used to add a GroupBox to the interface. The GroupBox tool is located in the containers section of the toolbox, because a GroupBox serves as a container for other controls.
advertisement

2. __________ is used to separate related controls from other controls in the form.
a) GroupBox
b) GroupBox tool
c) View Window
d) Groups
View Answer

Answer: a
Explanation: You can use GroupBox to visually separate related controls from other controls in the form. For example, suppose you are designing a calculator, the Groupbox in the interface will visually separate the controls relating to principle, rate and term information from the rest of the controls.

3. When you delete a groupbox the controls inside it are __________
a) Retained
b) Given to another groupbox
c) Data loss occurs
d) Deleted
View Answer

Answer: d
Explanation: The groupbox and the controls contained in the groupbox are treated as one unit. When you move the groupbox, the controls inside the groupbox are moved. Likewise when you delete a groupbox, the controls inside it are deleted.

4. Use __________ for the optional label entered in the groupbox’s text property.
a) Word capitalization
b) Sentence capitalization
c) Mixed capitalization
d) Row capitalization
View Answer

Answer: b
Explanation: You can include an identifying label in the group box, by setting the group box’s text property. Labeling a group box is optional, but if you do label it, the label should be entered using sentence capitalization.

5. The __________ method creates a periodic payment on either a loan or an investment.
a) Financial
b) Pmt
c) Financial.Pmt
d) Calculate
View Answer

Answer: c
Explanation: The Financial.Pmt method creates a periodic payment on either a loan or an investment and it returns the calculated value as a Double number. The syntax is Financial.Pmt (Rate,NPer, PV) ; where Rate is the interest rate per period, Nper is the total number of payment periods and PV is the loan amount.
advertisement

6. What will be the output of the following Visual Basic expression?

Financial.Pmt (0.05, 3, 9000)

a) -3304.88
b) -3408.48
c) -3034.88
d) -3043.88
View Answer

Answer: a
Explanation: The above expression calculates for a loan of Rs. 9000 for 3 years at 5% interest. Rate is 0.05, Nper is 3 and PV is 9000. The annual payment rounded off to nearest is, -3304.88.

7. What will be the output of the following Visual Basic expression?

advertisement
-Financial.Pmt (0.06/12, 5*12, 12000)

a) 200
b) 231.99
c) 345
d) 324.99
View Answer

Answer: b
Explanation: The above expression calculates the monthly payment for a loan of Rs. 12000 for 5 years at 6% interest. Rate is 0.06/12, Nper is 5*12 and PV is 12000. The monthly payment rounded to the nearest and expressed as a positive number is 231.99.

8. The number that appears after the period in the __________ value indicates the order in which the controls were added to the groupbox.
a) Tab index
b) Tab order
c) Groupbox tool
d) Tab value
View Answer

Answer:a
Explanation: You need to lock the controls in place and set the tab order. The number that appears after the period in the tab index values indicates the order in which the controls were added to the group box. The current tab index values appear on blue boxes in the form.

9. The TabIndex value of a group box is 5. If the txtName control was the first control added to the group box, its TabIndex value will be __________
a) 1
b) 5.0
c) 5.1
d) 1.5
View Answer

Answer: b
Explanation: The TabIndex values of the controls contained within the groupbox starts with the tab index value of the groupbox itself. Thus the control txtName has tabIndex 5, which indicates that the control belongs to the GroupBox and not to the form.
advertisement

10. Which of the following calculates the quarterly payment on a loan of $6000 for 3 years at 9% interest? Payments should be expressed as a negative number.
a) Financial.Pmt (0.09/4, 3*12, 6000)
b) Financial.Pmt (0.09/4, 3*4, 6000)
c) Financial.Pmt(0.09/12, 3*12, 6000)
d) Financial.Pmt( 0.09/12, 3*4, 6000)
View Answer

Answer: b
Explanation: When we calculate quarterly, we divide the rate by 4, and multiply the Nper by 4, thus option b is correct. On the other hand, when we calculate monthly, we divide the rate by 12 and multiply the Nper by 12. Similarly, when we calculate half yearly, we divide the rate by 2 and multiply the Nper by 2.

Sanfoundry Global Education & Learning Series – Visual Basic.

To practice all areas of Visual Basic for Experienced people, here is complete set of 1000+ Multiple Choice Questions and Answers.

Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn