Improving scripts

Improving scripts

Hi, please can you advise me what comment I cam make to the 2 following comments

QUESTION ONE – REPLY NEEDED

For my example, I am choosing to do a pseudocode detailing a banks nightly record keeping of deposits, withdrawals, and interest. The bank can this type of function to make record keeping much easier, and allow for it to always be constant. These methods add each amount together and in theory do the work of a person much faster and more accurately.

For this bank, they will collect their information for the day, right before the closing staff leaves, so they can record the number, and compare it to the employees and customers hand recorded transactions from throughout the day.

MsgBox “Good Evening! We will begin calculating your totals for the day.”

Time = 9pm

Deposit = TotalDeposit(DailyDeposit)

Withdrawals = TotalWithdrawal(DailyWithdrawal)

Interest = TotalInterst(DailyInterest)

DisplayTotal = (TotalDeposit, TotalWithdrawal, TotalInterst)

Function TotalDeposit(DailyDeposit)

If (DailyDeposit) Then

Add (DailyDeposit)

End If

End Function

Function TotalWithdrawal(DailyWithdrawal)

If (DailyWithdrawal) Then

Add (DailyWithdrawal)

End If

End Function

Function TotalInterst(DailyInterest)

If (DailyInterest) Then

Add (DailyInterest)

End If

End Function

Function DisplayTotal ( TotalDeposit, TotalWithdrawal, TotalInterst)

MsgBox “The totals at 9 pm are: Deposits” & TotalDeposit & “Withdrawals” & TotalWithdrawal & “Interest” & TotalInterest

End Function

QUESTION TWO _REPLIED NEEDED

I chose to use the video game example and it takes me back to the Sega CD days with Sonic when you had to speed through to get rings without hitting any obstacles or “sharp” objects which would make you lose them all. I believe the code for a video game would like as such (although I do realize this is not like the game too much):

‘define

Dim intTotalLife, intTotalCoins, intTotalTime, intTotalCombined, intFinalOutcome

intFinalOutcome = sum

intTotalLife = LifeScore

intTotalCoins = CoinsScore

intTotalTime = TotalTimeScore

intTotalCombined = ScoreSum

Function LifeScore

If Life = 0 Then

LifePoints = 0

End If

If Life = 1 Then

LifePoints = 50

End If

If Life = 2 Then

LifePoints = 100

End If

End Function

Function CoinsScore

If Coins = 0 Then

CoinPoints = 0

End If

If Coins = 100 Then

CoinPoints= 100

End If

If Coins = 200

CoinPoints = 200

End If

End Function

Function TotalTimeScore

If Time = 0 Then

TimePoints = 0

End If

If Time = 90 Then

TimePoints = 450

End If

If Time = 180 Then

TimePoints= 900

End If

End Function

Function Scoresum

sum = intTotalLife + intTotalCoins + intTotalTime &_ FinalOutcome

End Function

Function FinalOutcome

MsgBox “Your final score is “ intFinalOutcome

End Function

"You need a similar assignment done from scratch? Our qualified writers will help you with a guaranteed AI-free & plagiarism-free A+ quality paper, Confidentiality, Timely delivery & Livechat/phone Support.


Discount Code: CIPD30



Click ORDER NOW..

order custom paper