Acknowledgment: Ramesh Thamara Software Specialization Reg - No: 10404
Acknowledgment: Ramesh Thamara Software Specialization Reg - No: 10404
Software Specialization
Reg.No: 10404
Acknowledgment
Ramesh Thamara
Software Specialization
Reg.No: 10404
Contents
Assignment Specification ...................................................................................................... 3 Microsoft Visual Studio.NET.................................................................................................. 5 1.1Introduction................................................................................................................... 5 1.2 Versions ...................................................................................................................... 5 Software Development Life Cycle ......................................................................................... 6 Analysis ................................................................................................................................ 7 Design .................................................................................................................................. 8 1.1 Use case diagram........................................................................................................ 8 1.2 Class diagram ............................................................................................................. 9 Database Structure of the System....................................................................................... 10 1.1 Microsoft Office Access ............................................................................................. 10 1.2 Details of the database .............................................................................................. 10 Screen Design of the System .............................................................................................. 11 Coding of the System .......................................................................................................... 16 Message boxes ................................................................................................................... 21 Running the system ............................................................................................................ 23 System testing .................................................................................................................... 25 References ......................................................................................................................... 26
Ramesh Thamara
Software Specialization
Reg.No: 10404
Assignment Specification
ACT (PVT) Ltd is a financial company in Sri Lanka which provides financial for the public. ACT (PVT) Ltd was in business since 1999. Write a program in vb.ne to calculate and display saving schemes facilities for the benefit of the customer. Program Specification The fixed deposit period is calculated in months Interest rates (annual) 1-3 months 3-6 months 6-12 months 12-24 months 24-36 months 36 or more 5% 6% 8% 9% 10% 12%
Ramesh Thamara
Software Specialization
Reg.No: 10404
Include the following messages to the form(s) in appropriate functions/events i. ii. iii. Required fields cannot be blank Account number should be a numeric value Deposit amount should be numeric value
Create customer details report to display Customer Account Number Customer Name Deposit Amount Number of Years Total amount at maturity
Create a MDI form to include Fixed Deposit Details form Customer Details Report
Ramesh Thamara
Software Specialization
Reg.No: 10404
1.2 Versions
There are 5 versions of Visual Basic .NET implemented by the Visual Basic team. 1. 2. 3. 4. 5. Visual Basic .NET (2002) (VB 7.0) Visual Basic .NET 2003 (VB 7.1) Visual Basic 2005 (VB 8.0) Visual Basic 2008 (VB 9.0) Visual Basic 2010 (VB 10.0)
Ramesh Thamara
Software Specialization
Reg.No: 10404
Figure 1
Ramesh Thamara
Software Specialization
Reg.No: 10404
Analysis
During this stage, the problem is defined so that a clear understanding can be gained of what the system should do, i.e. what the inputs to the system are, what the output should be, and the operational parameters within which the system is expected to work. If the new system is to replace an existing system, the problem may be defined in terms of the additional or enhanced functionality that is required.
PROCESS -
If no of years < 36 then Interest rate = 0.12 If no of years >= 36 then Interest rate = 0.10 If no of years >= 24 then Interest rate = 0.12 If no of years >= 12 then Interest rate = 0.12 If no of years >= 6 then Interest rate = 0.12 If no of years >=3 then Interest rate = 0.12 If no of years > 1 then Interest rate = 0.12
OUTPUT -
Account number Full name Deposit amount Number of years Interest rate Total amount of year
Ramesh Thamara
Software Specialization
Reg.No: 10404
Design
In this stage, a solution to the problem is designed by defining a logical sequence of steps that will achieve each of the stated system objectives. Such a sequence of steps is often referred to as an algorithm. Some of the methods used to define program algorithms are described later in this section, and include flowcharts and pseudocode. These tools allow the program designer to break a given problem down into a series of small tasks which the computer can perform to solve the problem. The user interface will also be designed during this stage, and will determine how input is obtained, how output is displayed, and what controls are available to the user.
Enter Details
Printing Report
Ramesh Thamara
Software Specialization
Reg.No: 10404
Ramesh Thamara
Software Specialization
Reg.No: 10404
Primary key: Account number Table 2: Account Table structure: Field name Account no Interest Total maturity Data type Text Number Number
10
Ramesh Thamara
Software Specialization
Reg.No: 10404
Form details 1. Name: Form 1 2. Text: ACT(pvt)Ltd 3. Size: 424, 408 Label1 Label2 Label3 Label4 Label5 Textbox1 Textbox2 Batch No: 233 Name Text Name Text Name Text Name Text Name Text Name Text Name Label1 Fixed Deposit Details Lable2 Account Number Lable3 Full Name Lable4 Deposit Amount Lable5 Number of Years txtacno txtname 11
Ramesh Thamara
Software Specialization Text Name Text Name Text Name Text Name Text
Form 2
12
Ramesh Thamara
Software Specialization
Reg.No: 10404
Form details 1. Name: Form 2 2. Text: ACT(pvt)Ltd 3. Size: 440, 456 Label1 Label2 Label3 Label4 Label5 Label6 Label7 Textbox1 Textbox2 Textbox3 Textbox4 Textbox5 Textbox6 Button1 Button2 Button3 Button4 Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Name Text Label1 Fixed Amount Details Lable2 Account Number Lable3 Full Name Lable4 Deposit Amount Lable5 Number of years Lable6 Interest Rate Lable7 Total Amount at Maturity txtno txtna txtam txty txtin txtma btnprint Print btnedit Edit btnexit Exit btnback Back
13
Ramesh Thamara
Software Specialization
Reg.No: 10404
Form 3
Form details 1. Name: Form 3 2. Text: Customer Details Report 3. Size: 664, 576
14
Ramesh Thamara
Software Specialization
Reg.No: 10404
Form 4 (MDI)
Form details 1. Name Form 4 2. Text - ACT (PVT) Ltd. 3. Size - 456, 461
15
Ramesh Thamara
Software Specialization
Reg.No: 10404
Form 1 Coding
Public Class Form1 Inherits System.Windows.Forms.Form Private f2 As New Form2 Private dr As DataSet1.MasterAccountRow Private res As Integer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Da.Fill(DataSet11) btnadd.Enabled = False End Sub Private Sub btnadd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnadd.Click dr = DataSet11.MasterAccount.NewRow dr.Account_no = txtacno.Text dr.Full_name = txtname.Text dr.Deposit_amount = txtamount.Text dr.Number_of_months = txtyears.Text DataSet11.MasterAccount.AddMasterAccountRow(dr) Da.Update(DataSet11) MsgBox("Data has been added") End Sub Private Sub btnnext_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnnext.Click Dim intt1, intt2, intt3 As Integer Dim name As String intt1 = txtacno.Text intt2 = txtamount.Text intt3 = txtyears.Text name = txtname.Text accno = intt1 fname = name deamunt = intt2 noyear = intt3
16
Ramesh Thamara
Me.Hide() f2.Show() End Sub
Software Specialization
Reg.No: 10404
Private Sub txtacno_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtacno.LostFocus dr = DataSet11.MasterAccount.Rows.Find(txtacno.Text) If (txtacno.Text = "") Then MsgBox("Required fields cannot be blank", MsgBoxStyle.Information) txtacno.Focus() ElseIf Not IsNumeric(txtacno.Text) Then MsgBox("Account number should be a numeric value", MsgBoxStyle.Information) txtacno.Focus() txtacno.SelectionStart = 0 txtacno.SelectionLength = Len(txtacno.Text) ElseIf Len(txtacno.Text) <> 6 Then MsgBox("Invalid account number") txtacno.Focus() txtacno.SelectionStart = 0 txtacno.SelectionLength = Len(txtacno.Text) ElseIf dr Is Nothing Then res = MessageBox.Show("The number is not exists. Do you want to add new record?", "Record insertion", MessageBoxButtons.YesNo, MessageBoxIcon.Question) If res = vbYes Then btnadd.Enabled = True txtname.Focus() Else txtacno.Focus() txtacno.SelectionStart = 0 txtacno.SelectionLength = Len(txtacno.Text) End If Else MessageBox.Show("The number is exists") txtname.Text = dr.Full_name txtamount.Text = dr.Deposit_amount txtyears.Text = dr.Number_of_months End If End Sub
Private Sub txtamount_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtamount.LostFocus If Not IsNumeric(txtamount.Text) Then MsgBox("Deposite amount should be a numeric value") End If End Sub End Class
17
Ramesh Thamara
Software Specialization
Reg.No: 10404
Form 2 Coding
Public Class Form2 Inherits System.Windows.Forms.Form Private a1 As Integer Private a2 As Integer Private a3 As Decimal Private a4 As Decimal Private a5 As Decimal Private dr As DataSet1.AccountRow Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtno.Text = accno txtna.Text = fname txtam.Text = deamunt txty.Text = noyear End Sub
Private Sub txty_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txty.LostFocus a1 = txtam.Text a2 = txty.Text If (a2 a3 ElseIf a3 ElseIf a3 ElseIf a3 ElseIf a3 Else : End If <= 3) Then = "0.03" (a2 <= 6) Then = ".06" (a2 <= 12) Then = ".08" (a2 <= 24) Then = ".09" (a2 < 36) Then = ".10" a3 = ".12"
Private Sub btnedit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnedit.Click dr = DataSet11.Account.NewRow dr.Account_no = txtno.Text
18
Ramesh Thamara
Software Specialization
Reg.No: 10404
dr.Interest = txtin.Text dr.Total_maturity = txtma.Text DataSet11.Account.AddAccountRow(dr) Da.Update(DataSet11) MsgBox("Data has been edited") End Sub
Private Sub btnback_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnback.Click Dim f1 As New Form1 Me.Hide() f1.Show() End Sub
Private Sub btnexit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnexit.Click End End Sub
Private Sub btnprint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnprint.Click Dim f3 As New Form3 Me.Hide() f3.Show() End Sub End Class
19
Ramesh Thamara
Software Specialization
Reg.No: 10404
Module 1 Coding
Module Module1 Public accno As String Public fname As String Public deamunt As String Public noyear As String End Module
20
Ramesh Thamara
Software Specialization
Reg.No: 10404
Message boxes
If the account number is not entered then this message box will be appeared
If the number you entered does not exists this message box will be appeared.
If the deposit amount is not a numeric value this message box will be shown.
If the account number is not a numeric value this message box will be shown.
21
Ramesh Thamara
Software Specialization
Reg.No: 10404
This message box will be appeared to confirm that the data has been added successfully to the table.
If the account number already exists this message box will be appeared.
22
Ramesh Thamara
Software Specialization
Reg.No: 10404
To work with the application you should click on the Fixed Deposit Detail tab and launch the form. 2. Then the Fixed Deposit Detail form will be appeared
First you should enter the account number with six numbers. Then you enter the other relevant details and click the button Add to add the data to the Access database. N.B:- Number of years should be in months e.g. 2 years= 12 months
23
Ramesh Thamara
Software Specialization
Reg.No: 10404
Then the next form of the application will be appeared. There you can see the details that you added before. By pressing the Tab key you can find out the interest rate and the total maturity at amount. To add this details to the database click Edit button.
To view the customer details report you should close the form and click on the main menu item on the MDI form which shows Customer Details Report.
24
Ramesh Thamara
Software Specialization
Reg.No: 10404
System testing
System testing of software or hardware is testing conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. System testing falls within the scope of black box testing, and as such, should require no knowledge of the inner design of the code or logic. As a rule, system testing takes, as its input, all of the "integrated" software components that have successfully passed integration testing and also the software system itself integrated with any applicable hardware system(s). The purpose of integration testing is to detect any inconsistencies between the software units that are integrated together (called assemblages) or between any of the assemblages and the hardware. System testing is a more limited type of testing; it seeks to detect defects both within the "inter-assemblages" and also within the system as a whole.
25
Ramesh Thamara
Software Specialization
Reg.No: 10404
References
IDM Diploma in ICT (Dip.ICT) / Book II Specialization http://www.samsvb.co.uk/index.php?page=lesson&les=Lesson%2014
26