[SOLVED] C# programming code

Help me study for my C Programming class. I’m stuck and don’t understand.

Struggling to find relevant content or pressed for time? – Don’t worry, we have a team of professionals to help you on
[SOLVED] C# programming code
Get a 15% Discount on this Paper
Order Now

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, fields, and constants
  • Students will implement the selection structure
  • Students will select appropriate arithmetic, logical, 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 the material in Chapter 4 as well as concepts from previous chapters. The purpose of this lab is to demonstrate the use of the appropriate selection structure and to prevent data conversion exceptions using the TryParse method as well as input validation using if statements.

1. Complete Programming Problem #7, Software Sales, on page 267 of the textbook.

The ADDITIONAL REQUIREMENTS described below MUST also be implemented:

  • Apply the percent format string for displaying percentage output with one decimal place (i.e., the precision must be specified)
  • Apply the currency format string for displaying monetary output (i.e., displays a leading currency symbol, digits, comma separators, and a decimal point)
  • Apply the number format string for displaying non-monetary output with no decimal places (i.e., the precision must be specified)
  • Prevent data conversion exceptions for the number of package(s) purchased text box by using the TryParse method. If a data conversion exception occurs be sure and display an appropriate error message to the user, set the focus back to the text box, and either clear the text box or select all the data entered into it.
  • Validate the input for the number of package(s) purchased text box to make sure the data entered is greater than zero. If not, be sure and display an appropriate error message to the user, set the focus back to the text box, and either clear the text box or select all the data entered into it. Placed in a separate selection structure than the data conversion validation (Hint: nested if statement)
  • Implement named constant where applicable (i.e., the retail cost of the software package)
  • Implement the following fields:
    • Sum of amount of discount which accumulates the amount of discount (i.e., running sum of Amount of Discount)
    • Sum of packages purchased which accumulates the number of packages purchased (i.e., running sum of Number of Package(s) Purchased
    • Sum of orders which counts the number of individual orders placed (i.e., each time the user clicks the calculate button)
  • Calculate and display the average discount which is the sum of the amount of discount divided by the sum orders
  • The design of the form is up to you, but should include appropriate controls for the input of data and display of results. Add the following Label controls to the form (Note: A GroupBox control is placed around the Summary information). A revised form based upon the Additional Requirements is provided under #6 below.
    • Discount percent formatted as a percent with one decimal place
    • Total Amount Before the Discount formatted as currency
    • Amount of the Discount (even if it is 0) formatted as currency
    • Total Amount After the Discount formatted as currency
    • Sum of Amount of Discount formatted as currency
    • Sum of Packages Purchased formatted as a number with zero decimal places
    • Sum of Orders formatted as a number with zero decimal places
    • Average Discount formatted as currency

The program MUST also 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). The required naming convention is descriptive name including control type using camelCase notation. For example: packagesPurchasedTextBox, discountPercentLabel, exitButton. The exception is controls not referenced in the code-behind of the 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 standard access key
  • When the Clear button is clicked the controls outside the Summary GroupBox control should be cleared and the focus set back to the TextBox control for entering number of packages purchased. The controls inside the Summary GroupBox control should NOT be cleared. Do NOT reset the values of the fields.
  • AcceptButton and CancelButton properties should be appropriately assigned to the Calculate button and Clear button, respectively
  • Ensure tab order for form is logical
  • Appropriate naming conventions and data type declarations for variables and named constants
  • 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_Lab04)

3. Include the appropriate identification information per the course syllabus using comment statements above the using statements in the code-behind of Form1 (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 04 link under Assessments in the Chapter 4 Module.

6. See Revised Form based on Additional Requirements below. A PDF document with sample input-output is attached:

Calculate the price
Make an order in advance and get the best price
Pages (550 words)
*Price with a welcome 15% discount applied.
Pro tip: If you want to save more money and pay the lowest price, you need to set a more extended deadline.
We know how difficult it is to be a student these days. That's why our prices are one of the most affordable on the market, and there are no hidden fees.

Instead, we offer bonuses, discounts, and free services to make your experience outstanding.
How it works
Receive a 100% original paper that will pass Turnitin from a top essay writing service
step 1
Upload your instructions
Fill out the order form and provide paper details. You can even attach screenshots or add additional instructions later. If something is not clear or missing, the writer will contact you for clarification.
Pro service tips
How to get the most out of your experience with MyCoursebay
One writer throughout the entire course
If you like the writer, you can hire them again. Just copy & paste their ID on the order form ("Preferred Writer's ID" field). This way, your vocabulary will be uniform, and the writer will be aware of your needs.
The same paper from different writers
You can order essay or any other work from two different writers to choose the best one or give another version to a friend. This can be done through the add-on "Same paper from another writer."
Copy of sources used by the writer
Our college essay writers work with ScienceDirect and other databases. They can send you articles or materials used in PDF or through screenshots. Just tick the "Copy of sources" field on the order form.
See why 20k+ students have chosen us as their sole writing assistance provider
Check out the latest reviews and opinions submitted by real customers worldwide and make an informed decision.
Thank you for a well written paper!!!
Customer 452557, January 19th, 2022
Social Work and Human Services
Great Work!
Customer 452587, September 8th, 2021
Thank you for a great paper.
Customer 452707, August 6th, 2022
Great work. Will definitely recommend
Customer 452523, May 15th, 2021
Always perfect!!! Don is the best!
Customer 452453, July 27th, 2021
Perfectly done! Thanks again.
Customer 452707, July 18th, 2022
The skilled writer did a great job on assignment!! Thank you!!
Customer 452547, June 16th, 2021
Customer 452813, June 25th, 2022
Computer science
extremely happy with the service, again! You guys are the best.
Customer 452715, July 27th, 2022
Customer 452813, June 25th, 2022
Thank you to the writer and also thank you to the support team I got an A for the paper
Customer 452635, June 17th, 2022
Customer 452813, July 3rd, 2022
Customer reviews in total
Current satisfaction rate
3 pages
Average paper length
Customers referred by a friend
15% OFF your first order
Use a coupon FIRST15 and enjoy expert help with any task at the most affordable price.
Claim my 15% OFF Order in Chat

Thank you for choosing MyCoursebay. Your presence is a motivation to us. All papers are written from scratch. Plagiarism is not tolerated. Order now for a 15% discount

Order Now