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, 22.06.2019 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 23.06.2019 06:00
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Does read theory have answers keys ?
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
Biology, 04.05.2020 23:56
question
Mathematics, 04.05.2020 23:56
question
Mathematics, 04.05.2020 23:56
question
Mathematics, 04.05.2020 23:56
question
Mathematics, 04.05.2020 23:56
Questions on the website: 13722363