Tip Calculator Programs

December 06, 2019

To keep in practice with programming, I looked up programming samples and seen the Tip Calculator as a sample project that showed up on several programming practice lists. I did some feature creep on the idea to include more items. This way it wasn’t the same tip calculator that is seen everywhere and that would be created in most classes. Those features include: if more than one person is splitting the tip and then if they were all going to split the bill. I created the application in two different programming languages, Visual Basic, and the other as a Web Application using HTML, CSS, and JavaScript.

The app will take the amount of the bill, multiples that with the tip percentage to get the full amount of the tip. It will do two math equations: divide the tip by the number of people, then in another variable adds the total tip to the amount of the bill and divides that by the number of people. The totals of those two will then be rounded up to the nearest cent. It will then display the three totals: Bill Cost, Tip Amount, and Grand Total per person. If no people are added to the splitting of the bill, only tip amount and total will show. If there is no amount or no service selected, then an error message will be displayed.

You can download and play with the Visual Basic program here:
https://www.lynnamacher.com/programs/BillCalculator.exe.zip

Link to codepen for the web app version:
https://codepen.io/amacher13/pen/ZEzNJbo

 

Related Articles

Received AWS Certified Cloud Practitioner Certificate

Received AWS Certified Cloud Practitioner Certificate

This past weekend I tested and received my AWS Certified Cloud Practitioner certification. When I started training for the test I had very little exposure to AWS. I studied for a little over a month, around 60 hours, before taking the test; which luckily I passed on...

read more
Inventory HTML page to a CSV file

Inventory HTML page to a CSV file

As a New Year’s resolution, not mine, they wanted to make sure their online store, reseller site, inventory was up to date. They wanted to make sure their inventory was cleaned up and make sure that what’s listed on the site matches their own inventory. They had been...

read more
To create a child theme in WordPress

To create a child theme in WordPress

This write-up is to cover the very basics needed to have a child theme for testing, not instructions to create a full child theme for selling or white labeling for a client.You can get more in-depth information...

read more

Pin It on Pinterest

Share This