[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)
$0.00
*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.
Sign up, place your order, and leave the rest to our professional paper writers in less than 2 minutes.
step 1
Upload assignment 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.
s
Get personalized services with MyCoursebay
One writer for all your papers
You can select one writer for all your papers. This option enhances the consistency in the quality of your assignments. Select your preferred writer from the list of writers who have handledf your previous assignments
Same paper from different writers
Are you ordering the same assignment for a friend? You can get the same paper from different writers. The goal is to produce 100% unique and original papers
Copy of sources used
Our homework writers will provide you with copies of sources used on your request. Just add the option when plaing your order
What our partners say about us
We appreciate every review and are always looking for ways to grow. See what other students think about our do my paper service.
Other
Great Work!
Customer 452587, March 10th, 2022
Nursing
Always perfect!!! Don is the best!
Customer 452453, July 27th, 2021
Nursing
Thank you MyCoursebay team for your support. With your help I got an A for my past courses
Customer 452635, May 7th, 2022
Education
Thank you so much!
Customer 452675, March 17th, 2023
Business and administrative studies
GREAT
Customer 452813, June 20th, 2022
Other
OK
Customer 452813, July 3rd, 2022
Criminal Justice
always great!
Customer 452465, February 23rd, 2021
Nursing
Great paper!
Customer 452707, January 14th, 2024
Other
Amazing work
Customer 452909, September 4th, 2024
Psychology
Thanks so very much. The paper is well-researched and adequately referenced. You have been of great help during the pandemic!
Customer 452467, January 31st, 2021
Human Resources Management (HRM)
Thanks for your assistance and promptness.
Customer 452701, November 1st, 2022
Other
AWESOME
Customer 452813, June 25th, 2022
OUR GIFT TO YOU
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

Good News ! We now help with PROCTORED EXAM. Chat with a support agent for more information