-
Jun 19th, 2022, 11:35 AM
#1
Thread Starter
New Member
Bank customer programme (Windows forms .NET)
Hello everyone!
I need help with my studies, unrelated to programming. Unfortunately, for one subject we have to write a program in Visual Basic .NET for credit.
The assignment is due by July 7, below are the details.
Is anyone able to help me write such a program? I would be happy to get some advice, I mainly want help with subsections e and g.
Regards, Lukasz
a) The programme serves bank customers
b) The program uses data from a text file with the following structure:
Surname
Gender
Date of establishment of account
Bank name
Bank account number
Account balance
Information whether the status of "golden customer" (yes/no)
c) In the program we have a structure reflecting information about customers (there are appropriate fields) and a table of customers (we assume that the maximum number of customers may be 100)
d) In the program we read data about clients and we can: view (each time we see one client and data about him are in appropriate controls), modify their data and save data.
e) In the program we have the possibility to display statistical data: average balance of accounts (all), total funds on accounts, client with the poorest account (there may be a few such people), client with the richest account (as before), display of all clients who have funds below average, display of all clients with funds above average
f) The program shall use menus, dialogs
g) The program should be protected from potential errors such as: incorrect data entry in controls (e.g. someone enters a plain text instead of the account balance), an attempt to open a file when the user cancels the opening process (e.g. press cancel in the OpenFileDialog), it is not possible to enter the account number, which is not in accordance with the bank name (which banks have what identifier in the account number please read at least on Wikipedia - e.g. PKO bank in the account number has an arrangement 1020 on the digits from 3 to 6)
-
Jun 19th, 2022, 04:24 PM
#2
Re: Bank customer programme (Windows forms .NET)
g/
See how to use an openfiledialog... http://www.scproject.biz/Using%20Dialogs.php
For entering real decimal numbers, use a NumericUpDown control instead of a TextBox. For Account numbers that may start with a zero, you'll have to validate your TextBox input...
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Jun 19th, 2022, 08:27 PM
#3
Re: Bank customer programme (Windows forms .NET)
What have you done and where are you stuck? There's a link to a beginners tutorial in my signature below. We can help but it's your homework so you need to do the work. You haven't shown that you have considered the logic that the code would need to implement so you're not even really at the programming part yet.
-
Jun 20th, 2022, 07:43 AM
#4
Thread Starter
New Member
Re: Bank customer programme (Windows forms .NET)
Thank you for your advice! I'm just starting to write the program, once I get to grips with the "easiest" points I'll be writing for help with specific sub-points on a code basis.
-
Jun 20th, 2022, 08:12 AM
#5
Re: Bank customer programme (Windows forms .NET)
If you where to write this program in EU, most of the requests would fail under the GDPR law.
So European speaking you probably have issues in:
B)Surname,gender,Bank account number,Account balance
C) (we assume that the maximum number of customers may be 100) , is this a joke?
D) In the program we read data about clients and we can: view (each time we see one client and data about him are in appropriate controls), modify their data and save data.
Illegal.
E)Illegal, everything
F)Data choices out of? Nowhere. Illegal .
Please make sure your country allows such atrocity, although I highly doubt it.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jun 20th, 2022, 09:12 AM
#6
Lively Member
Re: Bank customer programme (Windows forms .NET)
Originally Posted by sapator
If you where to write this program in EU, most of the requests would fail under the GDPR law.
So European speaking you probably have issues in:
B)Surname,gender,Bank account number,Account balance
C) (we assume that the maximum number of customers may be 100) , is this a joke?
D) In the program we read data about clients and we can: view (each time we see one client and data about him are in appropriate controls), modify their data and save data.
Illegal.
E)Illegal, everything
F)Data choices out of? Nowhere. Illegal .
Please make sure your country allows such atrocity, although I highly doubt it.
Dude, its a school assignment, not a commercial app.
-
Jun 20th, 2022, 09:21 AM
#7
Re: Bank customer programme (Windows forms .NET)
Aha. Apologies I read your a,b,c etc and I could not believe what I was reading, so I must have missed the school project.
You can however tell your teacher that everything he/she wants would fall under the GDPR law is real life and also there is a slim to none chance that you will ever be asked to write a bank app , unless you are the bank itself.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jun 20th, 2022, 09:27 AM
#8
Re: Bank customer programme (Windows forms .NET)
Originally Posted by sapator
You can however tell your teacher that everything he/she wants would fall under the GDPR law is real life and also there is a slim to none chance that you will ever be asked to write a bank app , unless you are the bank itself.
Neither is especially relevant, given that projects like this are intended simply to demonstrate principles that can then be used in any app.
-
Jun 20th, 2022, 09:31 AM
#9
Re: Bank customer programme (Windows forms .NET)
It couldn't hurt to inform the teacher. Given that info could lead to a more relevant project that can take in consideration bank restrictions so it could be closer to real life scenarios.
Edit: We where in par with such an issue in the company as we had to work with the bank to support some applications of our own so this is not a way off scenario and can be used in other parallel apps .
Last edited by sapator; Jun 20th, 2022 at 09:34 AM.
ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·
-
Jun 20th, 2022, 10:23 AM
#10
Re: Bank customer programme (Windows forms .NET)
Originally Posted by sapator
It couldn't hurt to inform the teacher. Given that info could lead to a more relevant project that can take in consideration bank restrictions so it could be closer to real life scenarios.
They don't want it closer to real-life scenarios. They want it to demonstrate the principles that they're trying to teach. Real-life scenarios would involve complex stuff that would obfuscate those principles.
-
Jun 20th, 2022, 04:03 PM
#11
Re: Bank customer programme (Windows forms .NET)
Originally Posted by Luboc
b) The program uses data from a text file with the following structure: ...
Assuming that this is a CSV file, you could use the OleDb provider to read the values. Otherwise, you can always roll out your own. Being that this is a homework exercise, rolling out your own without the traditional CSV caveats would probably suffice.
What I would do is create a class that has a property for each field, read the file, parse the contents. Take a look at this example:
Code:
Public Class BankAccount
Public Property Surname As String
Public Property Gender As String
Public Property EstablishmentDate As DateTime
Public Property BankName As String
Public Property BankAccountNumber As String
Public Property Balance As Decimal
Public Property IsGoldenCustomer As Boolean
Public Shared Function ParseFromCsv(row As String) As BankAccount
' get the individual fields
Dim fields = row.Split({ ","c }, StringSplitOptions.RemoveEmptyEntries)
' check that there are exactly 7 fields
If (fields.Length <> 7) Then
Throw New Exception("There are not 7 fields in the CSV row.")
End If
' try to convert the date and decimal values
Dim establishmentDate As DateTime
Dim balance As Decimal
If (Not DateTime.TryParse(fields(2), establishmentDate)) Then
Throw New Exception("The EstablishmentDate field is not a valid Date.")
End If
If (Not Decimal.TryParse(fields(5), balance)) Then
Throw New Exception("The Balance field is not a valid Decimal.")
End If
' return the parsed value
Return New BankAccount() With {
.Surname = fields(0)
.Gender = fields(1)
.EstablishmentDate = establishmentDate
.BankName = fields(3)
.BankAccountNumber = fields(4)
.Balance = fields(5)
.IsGoldenCustomer = fields(6).Equals("yes", StringComparison.OrdinalIgnoreCase)
}
End Function
End Class
Originally Posted by Luboc
c) In the program we have a structure reflecting information about customers (there are appropriate fields) and a table of customers (we assume that the maximum number of customers may be 100)
This sounds like you need to create an array with an upper-bounds of 99, but the requirement says to use a table (DataTable perhaps?). I'm just going to assume that it is the former. In that case, declare your array as such:
Code:
Dim bankAccounts(99) As BankAccount
Originally Posted by Luboc
In the program we have the possibility to display statistical data: average balance of accounts (all), total funds on accounts, client with the poorest account (there may be a few such people), client with the richest account (as before), display of all clients who have funds below average, display of all clients with funds above average
If you are allowed to use LINQ, then it can be as simple as:
Code:
Dim average = bankAccounts.Average(Function(bankAccount) bankAccount.Balance)
Dim sum = bankAccounts.Sum(Function(bankAccount) bankAccount.Balance)
Dim poorest = bankAccounts.Where(Function(bankAccount) bankAccount.Balance = bankAccounts.Min(Function(innerBankAccount) innerBankAccount.Balance))
Dim richest = bankAccounts.Where(Function(bankAccount) bankAccount.Balance = bankAccounts.Max(Function(innerBankAccount) innerBankAccount.Balance))
Dim poorer = bankAccounts.Where(Function(bankAccount) bankAccount.Balance < average)
Dim richer = bankAccounts.Where(Function(bankAccount) bankAccount.Balance > average)
If you cannot use LINQ then let us know and I can show you the traditional looping equivalent.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|