CIS 221 Assignment #2
Working with Variables and Data types
In this assignment, you will create a VB .NET project to (1) use strings, constants, and variables (2) perform calculations (3) display formatted data and (4) use concatenation.
Objectives: Understand Arithmetic Data Types, Variables, and Constants, TextBoxes, Labels and Buttons, Understand Arithmetic Operators and Numeric Expressions, Understand Textual Data and Operations, Work with String Functions and String Formats, Use concatenation.
For this application you will create a VB .NET project to calculate income and expense items for your sport. The following is the information you have.
Data to be input:
Commissions earned (selling Licensed merchandise)
Expenses to be calculated:
Employee expenses (25% of Sales Amount)
Equipment (7% of Sales Amount)
Expenses (10% of Sales Amount)
Miscellaneous (Integer division by 22 of Sales Amount)
Taxes (20% of Net Income)
The first step is to either draw a flowchart or write pseudocode. This is required and will be needed before any professor help.
Constants for the percentages specified for the expenses above must be declared and used in this assignment. Make sure you declare the constants to be of an appropriate data type and then use them in the calculations (see below).
The Calculate button should: Calculate and display each of the expense items described above. Remember to add the Commissions for the Total income. Calculate and display how much of the Net Income to put into savings – count number of characters in the users name, take that number as percent of net income (divide by 100) as the % to put into savings. Convert the net income to the equivalent euro currency (.73 Euro per 1 USD). The converted currency will be displayed in decimal form (rounded to 4 decimals), and included in a completed string that appears in a label. All other calculated amounts should be displayed in ReadOnly textboxes. (NOTE: ReadOnly is a property that will cause the textbox to not be editable by the user, and sets its background color to grey by default). The finished application will look like the figure below. Note: Currency format is required for all outputs, except the Euros converted amount which should be in decimal form, but no dollar sign. You should also format the Sales Amount after using it in calculations. Set some color properties for the output label. Play around with color properties to get a nice aesthetic effect.
The Clear button should clear all textboxes and labels to calculate different scenarios. The Exit button should end the program and close the form.
In the sample provided below, you may notice that some of the areas have boxes with outlines to them. You don’t need to do this; you can just have labels for these headers, appropriately placed. But if you would like to try, you can use the GroupBox control (which is what you see). GroupBox is briefly described in chapter 4 of the textbook.
For the rest of the course, you MUST use good programming techniques (even if our book does not) and comment your code to describe what it is doing. Also, at the top of your code section, you need to put the following comments:
Name as instructed, zip and post to the assignment link provided by the due date and time. Include a comment about what was the easiest part and what was the most difficult. This is required. (Suggestion/required – test your program on a different computer.)
Either a flowchart or pseudo code of logic which should have been your first step (see instructions above). This may be hand drawn. Due in class, along with the printed code, stapled.
Write a Review
Leave a reply Cancel reply
Ask Your Question
We have verified professionals who are ready to answer your question.
Save Time and Money
We choose experts who can quickly answer your question and that suit your budget.
Get Your Answer
Your satisfaction is 100% guaranteed. You can keep on asking questions until you get the answer you need.