IVY TECH COMMUNITY COLLEGE
CINS 113 / Logic, Design & Programming / Internet Course
Lab #6: Classes (Zak Chapters 14 and 15)
SOLUTION FILE AND GRADING RUBRIC (20 points)
Student’s name Joshua A. Epley____________________________________________
INTRODUCTION: In the Resources section of Blackboard, there are links for installing Visual Basic 2010 Express Edition, and for downloading the data files you need for this course. Do those two things first before starting on this lab assignment. (Note: you can also use Visual Basic 2010 from Visual Studio 2010 for these assignments, although the interface might be slightly different.)
NOTE: There are videos in the Resources section of Blackboard for Chapter 14 and 15 that demonstrates all of the steps contained in the chapter. It is suggested that you view these videos, as well as read the chapters.
ASSIGNMENT:
1) Read and work through Chapter 14 and 15 of the lab textbook, “Clearly Visual Basic”.
2) In Chapter 14, from pages 241-260, you modify an application called Spaceship-Version 2. Modify the application as instructed, and make the following change:
a. Near the bottom of the form, above the Go button, add a label with the Text property, Designed by, followed by your name.
b. Make sure the program runs correctly as described on page 246 (BEFORE VERSION 2). Then insert the code to play the audio file as instructed on page 247 and run the program again, as instructed in step 2 on page 247 Click the Go button. The bottom of the spaceship should be showing. Take a “screen shot” of the form. Paste it at the end of this document, and then press ENTER twice.
c. Then, go into Code View for the form, copy the code (Edit / Select All and Edit / Copy), and paste it at the end of this document.
3) Do Exercise 2 on page 257. You will modify an application called OddEven. Modify the application as instructed, and make the following change:
a. Near the bottom of the form, above the Go button, add a label with the Text property, Designed by, followed by your name.
b. Make sure the program runs correctly as described on page 257. Enter the numbers 6 and 25 as instructed in step b, and click Display. Take a “screen shot” of the form. Paste it at the end of this document, and then press ENTER.
c. Then enter the numbers 25 and 6 as instructed in step c, and click Display. Take a “screen shot” of the form. Paste it at the end of this document, and then press ENTER.
d. You do not need to paste the code for this application.
4) At the end of Chapter 15, do Exercise 5 on page 274. Modify the program as instructed, and make the following change:
a. Near the bottom of the form, above the Go button, add a label with the Text property, Designed by, followed by your name.
c. Take a “screen shot” of the form. Paste it at the end of this document, and then press ENTER.
5) At the top of this page, replace the line after “Student’s name” with your name.
6) In Word 2007: Click the Office Button, Prepare, then Properties. Type your name as the Author and CINS 113 as the Subject. Close the Document Properties area by clicking the X at the right end of the yellow bar.
In Word 2010/2013: Click the File Tab, click Info (on the left), then click on the Properties dropdown (on the right), and select Show Document Panel. Type your name as the Author and CINS 113 as the Subject. Close the Document Properties area by clicking the X at the right end of the gray bar.
7) Save this Word document. Close the document.
8) In Blackboard, go to the Lab #6 assignment, click on the View/Complete Assignment link. 9) Attach this file (CINS 113 VB Lab 06.doc) and click Submit.
NOTES:
1) Any time you make changes to your Visual Basic program, you should use File / Save All to save all files associated with your program. Then use Build / Rebuild Solution to compile the program so that it can be run again.
2) In Blackboard, you can check to see if your file was submitted correctly. Go to My Grades, and in the column for this Lab, there should be a white exclamation mark on a green background. Click on the exclamation mark, and open up the submission page. Right-click on the link for your file, and see if it opens correctly. If not, contact your instructor immediately and ask for your attempt to be cleared.
CHECKLIST FOR SUBMITTING THE ASSIGNMENT:
You have entered your name at the top of this document after “Student’s name”
In the Properties area, you have entered your name as the Author, and CINS 113 as the Subject
The screen shot and code of the Spaceship, two screen shots of the Odd & Even Numbers, and the screen shot of the Discount Calculator forms should be pasted at the end of this document
You have attached this file, CINS 113 VB Lab 06.doc, using the Blackboard View/Complete Assignment link You are ready to click Submit
' Name: Spaceship Project
' Purpose: Drag the spaceship from the bottom to the top of the form ' Programmer: Joshua A. Epley on 07/11/2013
Public Class frmMain
Private Sub btnExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExit.Click Me.Close()
End Sub
Private Sub btnGo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnGo.Click ' drags the spaceship from the bottom to the top of the form
' position the spaceship at the bottom of the form picSpaceship.Top = 355
' remove the border from the label control ' then show the control
lblCountToBlastOff.BorderStyle = BorderStyle.None lblCountToBlastOff.Visible = True
' count down from 3 to 1, pausing execution after each number For intCount As Integer = 3 To 1 Step -1
lblCountToBlastOff.Text = intCount Me.Refresh()
System.Threading.Thread.Sleep(500) Next intCount
lblCountToBlastOff.Text = "Blast Off!" Me.Refresh()
System.Threading.Thread.Sleep(500)
' hide the label control
lblCountToBlastOff.Visible = False
' play an audio file
My.Computer.Audio.Play("j0388399.wav") ' drag the spaceship to the top of the form Do While picSpaceship.Top > 0
picSpaceship.Top = picSpaceship.Top - 100 Me.Refresh()
System.Threading.Thread.Sleep(100) Loop