subject

Visual basic programmingwrite code to create a class definition for account.1. these are the needed specs for the class. there is only one constructor for this class that receives two strings: firstname, and lastname. the values of these strings will be passed from the client code. see below for what to do with these strings. an account starts with a $100 balance (see balance property below).2. id. during creation (inside sub new), the id value is made of the user’s first name followed by the underscore followed by the last name, for example if passed “john” and “smith”, the id value is john_smith id is a string property that is read-only.3. password. during creation the value for password the same as the id with the added string "change". afterwards, the password may not be "displayed" to the client. however, client may change the password, using changepassword method below. this makes password a write-only property. to force the end user to change their password before using their account, a boolean variable, passwordreset, is set to true under sub new. this variable is to changed false under the changepassword method below.4.an account balance is a number with fractions: · this property is read-only.· amounts withdrawn or deposited into the account affect the balance, using the deposit and withdraw method below. account has the following methods: 1. deposit which takes two arguments, an amount (to be deposited as a number with fractions), and password (a string). if passwordreset is false, then check if the password passed matches the account password then the actions below are possible, otherwise an error message is shown. if passwordreset is true issue an error message to change the password first. if the amount passed is > 0 then add it to the current balance (recall balance is read-only), otherwise another error message is shown.2.withdraw which takes two arguments, an amount (to be withdrawn as a number with fractions), and password (a string). the logic to withdraw is the same as the logic to deposit, except that we must additionally check if the withdrawal will cause the balance to be negative), then no withdrawal is possible. issue an error message (make sure the balance is not changed). otherwise f the amount passed is > 0 then deduct from the current balance (recall balance is read-only), otherwise another error message is shown.3.changepassword is a method that takes two string, current password and a new password, if the current password matches the account password, change the account password to the new password, and issue a message, otherwise issue an error message. do not add any comments to your code anywhere in this test. it makes it hard to read the answer code.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 00:00
How do we use the sumif formula (when dealing with different formats) ?
Answers: 1
question
Computers and Technology, 23.06.2019 03:10
Acomputer has a two-level cache. suppose that 60% of the memory references hit on the first level cache, 35% hit on the second level, and 5% miss. the access times are 5 nsec, 15 nsec, and 60 nsec, respectively, where the times for the level 2 cache and memory start counting at the moment it is known that they are needed (e.g., a level 2 cache access does not even start until the level 1 cache miss occurs). what is the average access time?
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
question
Computers and Technology, 24.06.2019 01:30
How can you make your column headings stand out?
Answers: 1
You know the right answer?
Visual basic programmingwrite code to create a class definition for account.1. these are the needed...
Questions
question
Social Studies, 02.11.2020 18:10
question
Mathematics, 02.11.2020 18:10
question
Medicine, 02.11.2020 18:10
question
Mathematics, 02.11.2020 18:10
question
Mathematics, 02.11.2020 18:10
Questions on the website: 13722361