Você está na página 1de 26

Ramesh Thamara

Software Specialization

Reg.No: 10404

Acknowledgment

Batch No: 233

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

Batch No: 233

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%

Batch No: 233

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

Batch No: 233

Ramesh Thamara

Software Specialization

Reg.No: 10404

Microsoft Visual Studio.NET


1.1Introduction
Visual Basic .NET (VB.NET) is an object-oriented computer programming language that can be viewed as an evolution of the classic Visual Basic (VB), which is implemented on the .NET Framework. Microsoft currently supplies two main editions of IDEs for developing in Visual Basic: Microsoft Visual Studio 2010, which is commercial software and Visual Basic Express Edition 2010, which is free of charge. The command-line compiler, VBC.EXE, is installed as part of the freeware .NET Framework SDK. Mono also includes a command-line VB.NET compiler.

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)

Visual Basic .NET 2003 (VB 7.1)


Visual Basic .NET 2003 was released with version 1.1 of the .NET Framework. New features included support for the .NET Compact Framework and a better VB upgrade wizard. Improvements were also made to the performance and reliability of the .NET IDE (particularly the background compile) and runtime. In addition, Visual Basic .NET 2003 was available in the Visual Studio.NET Academic Edition (VS03AE). VS03AE is distributed to a certain number of scholars from each country without cost.

Batch No: 233

Ramesh Thamara

Software Specialization

Reg.No: 10404

Software Development Life Cycle


The software development life cycle (SDLC) is a framework defining tasks performed at each step in the software development process. SDLC is a structure followed by a development team within the software organization. It consists of a detailed plan describing how to develop, maintain and replace specific software. The life cycle defines a methodology for improving the quality of software and the overall development process.

Figure 1

Batch No: 233

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.

1.1 Analyzing the problem using run charts


INPUT - Account number

Full name Deposit amount Number of years

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

Total amount of maturity = Deposit amount + Deposit amount* Interest rate

OUTPUT -

Account number Full name Deposit amount Number of years Interest rate Total amount of year

Batch No: 233

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.

1.1 Use case diagram


Use case diagrams describe the functionality of a system and users of the system. Its purpose is to present a graphical overview of the functionality provided by a system in terms of actors, their goals, represented as use cases and any dependencies between those use cases.

Enter Details

Calculate the total amount at maturity Customer System Administrator

Printing Report

Batch No: 233

Ramesh Thamara

Software Specialization

Reg.No: 10404

1.2 Class diagram


Class diagram is a type of static structure diagram that describes the structure of a system by showing the systems classes, their attributes, and the relationships between the classes. 1 Customer * Account Account number Balance Interest rate No of years Deposit Withdraw

Name Account number

Batch No: 233

Ramesh Thamara

Software Specialization

Reg.No: 10404

Database Structure of the System


Microsoft Office Access has been used to create the database of this program.

1.1 Microsoft Office Access


A database is a collection of information that's related. Access allows you to manage your information in one database file. Within Access there are four major areas: Tables, Queries, Forms and Reports.

1.2 Details of the database


Database name: ACT (PVT) Ltd Table 1: Master_Account Table structure: Field name Account no Full name Deposit amount No of months Data type Text Text Number Number

Primary key: Account number Table 2: Account Table structure: Field name Account no Interest Total maturity Data type Text Number Number

Batch No: 233

10

Ramesh Thamara

Software Specialization

Reg.No: 10404

Screen Design of the System


Form 1

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

Reg.No: 10404 txtamount txtyears btnadd Add btnnext Next

Textbox3 Textbox4 Button1 Button1

Form 2

Batch No: 233

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

Batch No: 233

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

Batch No: 233

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

Batch No: 233

15

Ramesh Thamara

Software Specialization

Reg.No: 10404

Coding of the System


This stage, sometimes known as the implementation stage, is where the algorithms are translated into a programming language, and tends to be the longest phase of the development life-cycle. In this case, we are using Visual Basic to write the program.

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

Batch No: 233

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

Batch No: 233

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"

txtin.Text = a3 a4 = a3 * a1 a5 = a4 + a1 txtma.Text = a5 End Sub

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

Batch No: 233

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

Batch No: 233

19

Ramesh Thamara

Software Specialization

Reg.No: 10404

Form 4 Coding (MDI)


Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click Dim f1 As New Form1 f1.MdiParent = Me f1.Show() End Sub Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click Dim f2 As New Form3 f2.MdiParent = Me f2.Show() End Sub Private Sub Form4_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub End Class

Module 1 Coding
Module Module1 Public accno As String Public fname As String Public deamunt As String Public noyear As String End Module

Batch No: 233

20

Ramesh Thamara

Software Specialization

Reg.No: 10404

Message boxes

When the system is running following message boxes will be appeared

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.

Batch No: 233

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.

Batch No: 233

22

Ramesh Thamara

Software Specialization

Reg.No: 10404

Running the system


1. When you start the application you can see it as follows

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

Batch No: 233

23

Ramesh Thamara

Software Specialization

Reg.No: 10404

3. Then click the Next button

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.

Batch No: 233

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.

Batch No: 233

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

Batch No: 233

26

Você também pode gostar