Java Tutorials - Part 10 - Application 1 - Shapes Area Calculator

preview_player
Показать описание
In this video, we'll implement our first application in Java on topics covered by the previous tutorials; which is a program to calculate the area of a circle or a rectangle based on the user's choice.

Рекомендации по теме
Комментарии
Автор

AllPaint is a shop that specialises in household paint products. They have approached
you, an application developer for your services. They want you to develop an
application that they will use in their shop to estimate the amount of paint that
customers would need to purchase when they supply dimensions of their houses.
Furthermore, they want you to integrate this system with their point of sale system,
which would enable them to process paint sales. To process a sale, the system must
calculate the amount of value added tax (VAT) and also calculate the amount of
change after a customer tenders an amount. To develop this application, you will work
on the following rules:
 A house is a three-dimensional structure (the dimensions are length, width and
height)
 Two opposite walls are always equal
 A tin of paint covers about 10 square metres of wall space (doors and windows are
not put into consideration).
6
Create an application using Java that prompts the user for the length, width and height
of a rectangular room. Pass these THREE parameters to a method that does the
following:
 calculate the wall area for the room and displays it inside a label when a button is
clicked.
 passes the calculated wall area to another method that calculates and returns the
number of tins of paint needed.
 displays the number of tins needed in a label. This must happen at the click of a
button.
 compute the price of the paint given that a tin of paint costs R30 assuming that any
fraction of paint is bought at the full price of a tin. The total cost of the paint should
be displayed in a label when a button is clicked.
 The system (application) should calculate and display the amount of Value Added
Tax (VAT) charged at a rate of 15% and the Total Cost of the paint after Value
Added Tax should be displayed.
 Lastly the application should capture the amount tendered to the cashier and
calculate and display the change.

moorachiivibes