top of page

SWIFT FOR VCE SOFTWARE DEVELOPMENT

7. Using UI controls for IF statements- Employee discount

  • Writer: Admin
    Admin
  • Mar 6, 2018
  • 1 min read



While it is great that we can now code selections in swift, everything we have done so far is button based. Now, lets expand it a little to make navigation a little nicer. In Visual Basic and various other programming languages we can use checkboxes to control our selection structures.



Swift does not have checkboxes but we can use Switches and Segmented Controls to achieve most of the things we need. So lets have a quick look at doing this.


Sam wants an application in which he can enter the quantity of an item that a customer purchases and the item’s price. Customers who work at Sam’s company are entitled to a 10% employee discount. The application should calculate and display the total amount the customer owes.





Comentarios


SUBSCRIBE 

Feel free to subscribe to the site. 

This site is a collection of resources that I have developed to teach various courses, but specifically VCE Software development. I have uploaded it in the spirit of collaboration and hope that someone finds it useful. 

© 2018 Swift for VCE Software Development

 Proudly created with Wix.com

bottom of page