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 17:00
1. so if i wanted to build a linux server for web services(apache) with 1cpu and 2 gb of memory.-operating at 75% of memory capacity2. a windows server with 2 cpu/ 4gb memory- operating at 85% of memory capacity3. a storage server with 1 cpu/ 2gb memory- operating at 85% of memory capacityhow much memory do i have to add for each server.so that the utilization rate for both cpu and memory is at a baseline of 60%."the details for the cpu like its processor or the memory's speed isnt to be concerned" yeah i kept asking my teacher if he's even sure about the but the whole class seems to be confused and the project is due in 3 days..this is a virtualization project where i have to virtualize a typical server into an exsi hypervisor.
Answers: 2
question
Computers and Technology, 22.06.2019 18:10
How can i delete permalinks from a word press site?
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What does 21 pilots middle aged name as a band 15 years prior to them naming their band 21 pilots?
Answers: 1
question
Computers and Technology, 25.06.2019 07:30
What does the hard disk drive do? it stores all of the information on a computer. it controls a computer’s operating system. it enables visual interaction with a computer. it contains all of a computer’s internal parts.
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
Mathematics, 23.04.2020 03:36
Questions on the website: 13722363