Presentation is loading. Please wait.

Presentation is loading. Please wait.

OUTPUT: Guess a number (1-100) 60 Too High! Guess a number (1-100) 41 Too Low! Guess a number (1-100) 42 Correct!

Similar presentations


Presentation on theme: "OUTPUT: Guess a number (1-100) 60 Too High! Guess a number (1-100) 41 Too Low! Guess a number (1-100) 42 Correct!"— Presentation transcript:

1 OUTPUT: Guess a number (1-100) 60 Too High! Guess a number (1-100) 41 Too Low! Guess a number (1-100) 42 Correct!

2 Enter your midterm grade: A Excellent. You don't need to take the final. End of program Press any key to continue Enter your midterm grade: B Very good. Your grade is now: A End of program Press any key to continue Enter your midterm grade: C Passing End of program Press any key to continue Enter your midterm grade: D Not good. Go Study. End of program Press any key to continue Enter your midterm grade: E That is not a possible grade. End of program Press any key to continue Enter your midterm grade: A Excellent. You don't need to take the final. End of program Press any key to continue Enter your midterm grade: B Very good. Your grade is now: A End of program Press any key to continue Enter your midterm grade: C Passing End of program Press any key to continue Enter your midterm grade: D Not good. Go Study. End of program Press any key to continue Enter your midterm grade: E That is not a possible grade. End of program Press any key to continue

3 Storyboard for Grade Entry System

4 Public Class Form1 Inherits System.Windows.Forms.Form Dim sum As Integer + Windows Form Designer Generated Code Private Sub Button1_Click(...) Handles Button1.Click sum = sum + grade.Text size.Text = CInt(size.Text) + 1 grade.Clear() End Sub Private Sub Button2_Click(...) Handles Button2.Click MessageBox.Show("Average: " & (sum / size.Text), _ "Average", _ MessageBoxButtons.OK, _ MessageBoxIcon.Information) End Sub End Class

5 ... Storyboard for Debt Calculator Using MessageBox to Output Monthly Balance

6 Public Class Form1 Inherits System.Windows.Forms.Form + Windows Form Designer generated code Private Sub Button1_Click(...) Handles Button1.Click Dim balance As Double = balanceInput.Text Dim interest As Double = interestInput.Text Dim endBalance As Double = endBalanceInput.Text Dim months As Integer = 0 While (balance <= endBalance) balance = balance + interest * balance months = months + 1 MessageBox.Show("Balance: " & balance.ToString("C"), _ "Month " & months, _ MessageBoxButtons.OK, _ MessageBoxIcon.Information) End While MessageBox.Show("Number months: " & months & _ " Balance: " & balance.ToString("C"), _ "Debt Computation", _ MessageBoxButtons.OK, _ MessageBoxIcon.Information) End Sub End Class

7 Storyboard for Debt Calculator Using ListBox to Output Monthly Balances... Much Nicer!!!

8 Public Class Form1 Inherits System.Windows.Forms.Form + Windows Form Designer generated code Private Sub Button1_Click(...) Handles Button1.Click Dim balance As Double = balanceInput.Text Dim interest As Double = interestInput.Text Dim endBalance As Double = endBalanceInput.Text Dim months As Integer = 0 While (balance <= endBalance) balance = balance + interest * balance months = months + 1 ListBox1.Items.Add(months & ControlChars.Tab & balance.ToString("C")) End While MessageBox.Show("Number months: " & months & _ " Balance: " & balance.ToString("C"), _ "Debt Computation", _ MessageBoxButtons.OK, _ MessageBoxIcon.Information) End Sub End Class


Download ppt "OUTPUT: Guess a number (1-100) 60 Too High! Guess a number (1-100) 41 Too Low! Guess a number (1-100) 42 Correct!"

Similar presentations


Ads by Google