0% found this document useful (0 votes)
284 views6 pages

MCA Lab Report 1

This document describes Lab 1 of the Computer Manufacturing Applications course. It includes: 1. An introduction to the room charger calculator program created by students, which calculates room charges, additional charges, taxes, and totals based on user input. 2. Screenshots of the program's graphical user interface before and after execution. 3. An overview of the program's flow chart and programming code in Visual Basic, which calculates charges and displays results based on inputted nightly rates, services, and taxes.

Uploaded by

damian wayne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
284 views6 pages

MCA Lab Report 1

This document describes Lab 1 of the Computer Manufacturing Applications course. It includes: 1. An introduction to the room charger calculator program created by students, which calculates room charges, additional charges, taxes, and totals based on user input. 2. Screenshots of the program's graphical user interface before and after execution. 3. An overview of the program's flow chart and programming code in Visual Basic, which calculates charges and displays results based on inputted nightly rates, services, and taxes.

Uploaded by

damian wayne
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Faculty of Technology

Computer Manufacturing Applications


BTM 3234

LAB 1

Lecturer : En. MOHD TARMIZY BIN CHE KAR

No. Name ID Group


1 Chang Lee Yong TA17001
2 Mohd Khair Nabil Bin Mohd Rozlan TA17027
INTRODUCTION
This is one of the projects early on in our lab Computer Manufacturing Applications
BTM 3234, but we kinda added a lot of tiny features and functionality to make it more
appealing and more user friendly, such as the program will calculate for room charge,
additional charge, subtotal, tax by the value given from the user. And lastly, the program
showed the result of calculation for total room charge.
After that, this program comes with detail date and time. Then, we also can key the
information when the users have the additional charge such as telephone, room service and
misc.

GRAPHICAL USER INTERFACE (GUI)

Figure 1 Before Execution of the Room Charger Calculator


Figure 2 After Execution of the Room Charger Calculator
1. FLOW CHART

Start

Declare the input variables


Night, Night Charge, Room Service, Telephone, Misc,
Room Charges, Additional Charges, Subtotal, Tax,
Total Charges

Calculate charges

RC = Night * NC
AC = RS + Tel + Misc
Subtotal = RC + AC
Tax = 0.08 * Subtotal
TC = Subtotal + Tax

Label17.Text = RC.ToString("C")
Label18.Text = AC.ToString("C")
Label19.Text = Subtot.ToString("C")
Label20.Text = Tax.ToString("C")
Label21.Text =TC .ToString("C")

Display result

Clear

Stop
2. PROGRAMMING
FORM 1
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label4.Text = Now.ToString("D") 'Displays Day & Date
Label5.Text = Now.ToString("hh:mm:ss tt") 'Displays Time
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim a, b, c, d, f, v, w, x, y, z As Double

a = TextBox1.Text 'Values input


b = TextBox2.Text
c = TextBox3.Text
d = TextBox4.Text
f = TextBox5.Text

v = (a * b) 'Calculation formula
w = (c + d + f)
x = (v + w)
y = (x * 0.08)
z = (x + y)

Label16.Text = v.ToString("c") 'Values output in RM


Label17.Text = w.ToString("c")
Label18.Text = x.ToString("c")
Label19.Text = y.ToString("c")
Label20.Text = z.ToString("c")

End Sub

CLEAR

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click


TextBox1.Text = "" 'Clear all values
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""

Label16.Text = ""
Label17.Text = ""
Label18.Text = ""
Label19.Text = ""
Label20.Text = ""
End Sub
EXIT
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
End 'Exits the program
End Sub

End Class

DATE & TIME SETTING


Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label22.Text = Now.ToString("D")
Label23.Text = Now.ToString("T")
End Sub
End Class

5. DISCUSSION

Visual Basic is widely used to write working programs. In this experiment, Room
Charger Calculator is executed by using create Graphical User Interface and use Visual Basic
development tools.

You might also like