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

Roman number converter

Roman number converter

While finishing up the JavaScript lessons in Free Code Camp we had to build a Roman numeral converter to take a number from 1 to 3999* and convert it to the Roman numerals. Spending some time with it I thought this would be a good program to create a web app. I...

read more
Kelsey Zukowski’s  Website Resign

Kelsey Zukowski’s Website Resign

During the Covid-19 shutdown we took the opportunity to redesign Kelsey Zukowski’s website. Before we had used a regular theme to get her site up and going. We took this time to dig in and design a new theme with the goal to bring it more up to date with today...

read more
Turn Your Website to the Darkside

Turn Your Website to the Darkside

With the popularity of the dark mode which allows a user to change in operating systems, mobile devices, and included in several applications. The dark mode changes the system and apps to a dark background with a light text. With this being popular and customers are...

read more

Pin It on Pinterest

Share This