MCC - CIS162AD
CS3 Sales Calculator - 10 points![]()
The purpose of this assignment is give students an opportunity to review the declaration and uses of variables in calculations. To accomplish this students must:
Students may create their own interface from scratch if they desire, but downloading and expanding the archive is recommended.
- Download and expand the CS3 Interface Archive, which includes the form interface and skeleton methods (see instructions below).
- Enter all of the source code presented at the bottom, including the comments.
- Pay attention to declaration and use of the class-level and local variables, as well as the data types of each of the variables.
- The program uses a Try-Catch block even though the reading on this topic has not been assigned to this point. Just enter the code as presented, and then review the Try-Catch section as listed on the Course Schedule.
- Submit CS3Form.cs and CS3Form.Designer.cs
To download and expand acrhive:
- Set the Text of the form to the assignment number and your name (CS3 Your Name).
- The borders around the various groups were created using the GroupBox object, and are usually drawn first before adding the labels and text boxes.
- The results of the calculations are displayed in Labels with AutoSize set to False and the BorderStyle set to Fixed3D.
- The labels on the left hand side do not have meaningful names because they are not referenced in code, but the rest of control objects addressed in program code have a meaningful name.
- Double click on and of the buttons to switch to code view.
To open an existing project see below or refer to Step 22 of CS1:
- Download and expand the archive cs3_sales_calculator.exe by right clicking on the link and selecting Save Link As or Save Target As. Note where you save the archive.
- Using Windows Explorer to find the archive file, cs3_sales_calculator.exe
- Double click on the archive to execute it.
- Use the Extract to dialog box to navigate to where you save your projects.
- Click on Extract. All of the files should be extracted into their appropriate folders.
- Click on Close to exit the application.
Interface Sample:
- Start Visual Studio.
- Click on File scroll down and mouse over Open , and then slide over and select Project/Solution .
- Navigate to the CS3 folder.
Click on the solution file (CS3.sln) to select it, and then click on Open . - You may also be able to double-click on the solution file when using Windows Explorer. Always open the solution file (.sln) . If you open a form file (CS3Form.cs), Visual Studio will not know the projects settings. It will not be able to generate the form and compile the program.
- Windows hides the files extensions by default. It may be best to search your help system to change the setting so that known file extensions are NOT hidden. It is usually set through Windows Explorer and selecting Folder Options from the Tools menu.
![]()
Source Code: (presented as a series of images)
![]()
![]()
![]()
Submit CS3Form.cs and CS3Form.Designer.cs
Revised: 09/21/2011 - www.mesacc.edu/~marquez/cis162ad/cs3_sales_calculator.html