Tarleton State University Distance Calculator Lab Paper This lab relates to the following Skill Outcomes:
Students will apply the steps in the program development process
Students will implement object-oriented programming through predefined classes
Students will develop graphical user interface applications using appropriate controls
Students will implement primitive data types for variables and fields
Students will implement the repetition structure
Students will select appropriate arithmetic and relational operators
Students will analyze, design, implement, test, and debug domain-specific applications which demonstrate basic computation, input/output, control structures, and operators
This lab covers material from Chapter 5 as well as concepts from previous chapters. The purpose of this lab is to demonstrate the use of the appropriate repetition structure as well as to prevent data conversion exceptions using the TryParse method and implement appropriate accuracy validation. Accumulators, counters, and averages are also implemented.
1. Complete Programming Problem #1, Distance Calculator, on page 339 of the textbook.
The ADDITIONAL REQUIREMENTS described below MUST also be implemented:
Assume the value of Vehicle Speed in MPH may store whole or floating-point numbers (non-monetary).
Assume the value of Hours Traveled can only store whole numbers.
Prevent data conversion exception for the Vehicle Speed in MPH text box by using the appropriate TryParse method. If the data entered is invalid display an appropriate error message to the user, set the focus back to the text box causing the error, and either clear the text box or select all the data entered into it so that it can be replaced.
Validate the input for the Vehicle Speed in MPH to make sure the data entered is greater than zero and does not exceed 180. If not, display an appropriate error message to the user, set the focus back to the text box causing the error, and either clear the text box or select all the data entered into it so that it can be replaced.
Prevent data conversion exception for the Hours Traveled text box by using the appropriate TryParse method. If the data entered is invalid display an appropriate error message to the user, set the focus back to the text box causing the error, and either clear the text box or select all the data entered into it so that it can be replaced.
Validate the input for Hours Traveled to make sure the data entered is greater than zero and not more than 50. If not, display an appropriate error message to the user, set the focus back to the text box causing the error, and either clear the text box or select all the data entered into it so that it can be replaced.
Implement the following fields:
Total Distance which accumulates the distance for each entry (i.e., as shown in the ListBox control)
Total Hours Traveled which accumulates the hours traveled for each entry (i.e., as entered in the Hours Traveled TextBox control)
Total Trips which counts each entry (i.e., incremented each time the user clicks the Calculate Button control)
Display appropriate output to the ListBox control as shown in the sample input-output document attached.
Display Total Distance as a number with two-decimal places.
Display Total Hours Traveled and Total Trips as a number with no decimal places.
Calculate and display the Average Distance which is the Total Distance divided by the Total Trips (recall, average distance is not an accumulator or counter) formatted as a number with two-decimal places.
The program MUST include standard features of a Windows application including:
Change the default Text property of the form to something descriptive
Appropriate naming conventions for all controls (i.e., buttons, labels, text boxes, list). The standard naming convention is descriptive name including control type using camelCase notation. For example: hoursTraveledTextBox, distanceListBox, totalHoursTraveledLabel, exitButton. The exception is controls not referenced in the code-behind of Form1. For example, Label controls used for descriptive purposes only or PictureBox controls used for aesthetic purposes only.
Calculate, Clear, and Exit buttons with appropriate name and keyboard access key
AcceptButton and CancelButton properties should be appropriately assigned to the Calculate button and Clear button, respectively
Ensure tab order for form is logical
When Clear button is clicked the controls outside of the Summary GroupBox control should be cleared (i.e. using the Clear method or assigning an empty string) and the focus set back to the first TextBox control for entering data. The controls inside the Summary GroupBox control should NOT be cleared (i.e., using the Clear method or assigning an empty string). Do NOT reset the values of the fields to zero.
Appropriate naming conventions and data type declarations for variables and fields.
Remove all unused event handlers from the program code.
2. Name your project using the naming convention provided in the syllabus: CourseNumber_LastNameFirstInitial_LabXX (e.g., 3333_SharpJ_Lab05)
3. Include the appropriate identification information per the course syllabus using comment statements at the top of your project code (see p. 102, 2.8 Comments, Blank Lines, and Indentation): Name, 9-Digit ID, Due Date, Date Submitted, and Brief Description of Program.
4. You will need to zip/compress the project folder using an appropriate zip/compression utility such as the one found in the Windows or WinZip, etc. Please DO NOT submit .rar (archive) files.
5. Attach and submit the zipped/compressed project folder file under the Lab 05 link under Assessments in the Chapter 5 Module.
6. See Revised Form based on Additional Requirements below. A PDF document with sample input-output is attached:
Attachments Lab 05 Sample Input-Output
Purchase answer to see full
attachment
Why should I choose Homework Writings Pro as my essay writing service?
We Follow Instructions and Give Quality Papers
We are strict in following paper instructions. You are welcome to provide directions to your writer, who will follow it as a law in customizing your paper. Quality is guaranteed! Every paper is carefully checked before delivery. Our writers are professionals and always deliver the highest quality work.
Professional and Experienced Academic Writers
We have a team of professional writers with experience in academic and business writing. Many are native speakers and able to perform any task for which you need help.
Reasonable Prices and Free Unlimited Revisions
Typical student budget? No problem. Affordable rates, generous discounts - the more you order, the more you save. We reward loyalty and welcome new customers. Furthermore, if you think we missed something, please send your order for a free review. You can do this yourself by logging into your personal account or by contacting our support..
Essay Delivered On Time and 100% Money-Back-Guarantee
Your essay will arrive on time, or even before your deadline – even if you request your paper within hours. You won’t be kept waiting, so relax and work on other tasks.We also guatantee a refund in case you decide to cancel your order.
100% Original Essay and Confidentiality
Anti-plagiarism policy. The authenticity of each essay is carefully checked, resulting in truly unique works. Our collaboration is a secret kept safe with us. We only need your email address to send you a unique username and password. We never share personal customer information.
24/7 Customer Support
We recognize that people around the world use our services in different time zones, so we have a support team that is happy to help you use our service. Our writing service has a 24/7 support policy. Contact us and discover all the details that may interest you!
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
Our reputation for excellence in providing professional tailor-made essay writing services to students of different academic levels is the best proof of our reliability and quality of service we offer.
Essays
When using our academic writing services, you can get help with different types of work including college essays, research articles, writing, essay writing, various academic reports, book reports and so on. Whatever your task, homeworkwritingspro.com has experienced specialists qualified enough to handle it professionally.
Admissions
Admission Essays & Business Writing Help
An admission essay is an essay or other written statement by a candidate, often a potential student enrolling in a college, university, or graduate school. You can be rest assurred that through our service we will write the best admission essay for you.
Reviews
Editing Support
Our professional editor will check your grammar to make sure it is free from errors. You can rest assured that we will do our best to provide you with a piece of dignified academic writing. Homeworkwritingpro experts can manage any assignment in any academic field.
Reviews
Revision Support
If you think your paper could be improved, you can request a review. In this case, your paper will be checked by the writer or assigned to an editor. You can use this option as many times as you see fit. This is free because we want you to be completely satisfied with the service offered.