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 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
question
Computers and Technology, 22.06.2019 22:10
Asequential circuit contains a register of four flip-flops. initially a binary number n (0000 ≤ n ≤ 1100) is stored in the flip-flops. after a single clock pulse is applied to the circuit, the register should contain n + 0011. in other words, the function of the sequential circuit is to add 3 to the contents of a 4-bit register. design and implement this circuit using j-k flip-flops.
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
When a presentation is being planned, it is important to ensure that it covers all available information. appeals to the audience. uses multimedia tools. entertains the audience.
Answers: 1
question
Computers and Technology, 25.06.2019 03:30
All nate specialties are offered at two levels, a. journeyman and master. b. installation and service. c. apprentice and journeyman. d. heating and air conditioning.
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
Computers and Technology, 03.12.2021 03:50
question
Computers and Technology, 03.12.2021 03:50