# 1) Exercise 9, steps b and c, on page 298-299 of the lab textbook, “Clearly Visual Basic”, at the end of Chapter 16.

1) Exercise 9, steps b and c, on page 298-299 of the lab textbook, “Clearly Visual Basic”, at the end of Chapter 16.

ASSIGNMENT:

1) Exercise 9, steps b and c, on page 298-299 of the lab textbook, “Clearly Visual Basic”, at the end of Chapter 16. You will use the experience you have gained so far in this class to create an application. Create the application as instructed, and make the following changes:

a. Enlarge your form if necessary. In the bottom center area of the form, add a label with the Text property, Designed by, followed by your name.

b. Add a button between the Calculate and Exit buttons, with the text “Clear”, and code it to clear the two input text boxes and the output labels.

c. Put five comment lines at the top of the code page, listing:
‘Project Name: Water Bill Project
‘Class: CINS 113-nn [section number]
‘Purpose: [1- or 2-line description of program]

d. Put brief comments in all sub procedures, explaining what that section does: the button click procedure, the sub procedure for making the calculations, the sub procedure for displaying the results, as well as the Clear button and the Exit button sub procedures.

e. Declare the rate of .00205 dollars per gallon as a constant.

f. The variables for Current reading, Previous reading and Gallons used should be integers.

g. Your message box for invalid input should include these things:

i. The message should include the numbers the user entered, for example: “ERROR: Current reading (2000) cannot be less than Previous reading (3000).”

ii. The title bar text should say “Invalid Input”.

iii. The message box button should say “OK”.

iv. The message box icon should be the Error icon.

h. The output for the total charge should be displayed in currency format.

i. Run the program, entering 8450 as the Current reading, and 6225 as the Previous reading. Click Calculate, then take a screen shot of the form, paste it at the end of this document, and press ENTER twice.

j. Clear the text boxes, and run the program again, entering 8450 as the Current reading, and 8995 as the Previous reading. Before you click Calculate, take a screen shot of the form, paste it at the end of the document and press ENTER twice.

k. Then click Calculate. A message box should pop up with an invalid input error message. Take a screen shot of the message box and paste it at the end of this document.

l. Go to Code View for your form, copy all the code (using Edit / Select All and Edit / Copy, or CTRL-A and CTRL-C), and paste it at the end of this document (using Edit / Paste or CTRL-V).

m. You do not have to do step 9a, listing output, input and processing items and a pseudocode algorithm.

2) At the top of this page, replace the line after “Student’s name” with your name.

3) Click the Office Button, Prepare, and Properties, and 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.

4) Save this Word document. Close the document.

5) In Blackboard, go to Session #8 in Class Sessions when it is made available, and click on the View/Complete Assignment link.

6) Attach this file (CINS 113 VB Midterm Project.doc) and click Submit.

HINTS:

1) To restrict a text box to accepting only certain characters, see page 190, Coding the KeyPress event procedure

2) To exit, see Chapter 4

3) Suggestion: pass the gallons used and total charge variables to the sub procedures by reference

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.

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

· You have attached this file, CINS 113 VB Midterm Project.doc, using the Blackboard View/Complete Assignment link

· You are ready to click Submit

· Check your file submission using the instructions in the Note section above

``In this excise, you code an application that calculates a water bill. ``
``The clerk at the water department will enter the current meter reading and the previous meter reading in two text boxes. ``
``The application shuold calculate and display the number of gallons of water used and the total charge for the water. ``
``The charge for water is 2.05 per 1000 gallons, or .00205 per gallon. ``
``Use two independent Sub procedures: one to make the calculations and the other to display the results. ``
``Call both Sub procedures from the Calculate button's Click event procedure. ``
``Make the calculations only when the current meter reading is ``

## "96% of our customers have reported a 90% and above score. You might want to place an order with us."

##### Affordable prices

You might be focused on looking for a cheap essay writing service instead of searching for the perfect combination of quality and affordable rates. You need to be aware that a cheap essay does not mean a good essay, as qualified authors estimate their knowledge realistically. At the same time, it is all about balance. We are proud to offer rates among the best on the market and believe every student must have access to effective writing assistance for a cost that he or she finds affordable.

##### Caring support 24/7

If you need a cheap paper writing service, note that we combine affordable rates with excellent customer support. Our experienced support managers professionally resolve issues that might appear during your collaboration with our service. Apply to them with questions about orders, rates, payments, and more. Contact our managers via our website or email.

##### Non-plagiarized papers

“Please, write my paper, making it 100% unique.” We understand how vital it is for students to be sure their paper is original and written from scratch. To us, the reputation of a reliable service that offers non-plagiarized texts is vital. We stop collaborating with authors who get caught in plagiarism to avoid confusion. Besides, our customers’ satisfaction rate says it all.

© 2022 Homeworkcrew.com provides writing and research services for limited use only. All the materials from our website should be used with proper references and in accordance with Terms & Conditions.

Scroll to Top