SlideShare a Scribd company logo
1 of 23
Macias
Winter 2020
ENG 107
Project #2
A Year in Gaming
(100 points)
For this project, you will create a digital portfolio of the games
that were released on a certain year in gaming history. I will
assign these years in class to avoid duplicates. Once you have
your year, research the games that were released then.
You will then create a digital portrait of that year and group the
games into categories based off what you notice about these
games. Are there any similarities? Were there any particular
world events that might have inspired these? (Games take years
to make so you might look back over the previous two to five
years for answers to this.) Were there any innovations to the
gaming world that helped usher in these types of games? What
consoles were popular at the time? What were the top selling
games? Who are the game makers targeting as potential gamers
with these games? Look for interesting trends, moments, and
other facts to add depth to your project.
The answers to these questions and your groupings then need to
be presented in a digital format. You can create a Powerpoint or
Prezi presentation or you might choose to create a Tumblr,
Instagram, Twitter, blog, WordPress, Pinterest, etc. account or
even create a YouTube video for your year. If what you want to
do isn’t listed- ask me.
Somewhere in the project, you must include the following:
· Your year
· Visual media
· Answers to above questions answered fully
· Games categorized
· Your name and class
· Organization
· A minimum of 1,200 words combined
· Creativity and originality
Important Dates
Tuesday, February 4th - Peer Workshop (digital or physical
draft due in class)
First draft due to BlackBoard by
11:59pm
Thursday, February 13th- Final draft due to BlackBoard by
11:59pm
Either upload and attach your project or send me a link in the
submission text box.
Your assigned year: ___________
· A procedure needs to store an inventory item’s name, height,
and weight. The height may have a decimal place. The weight
will be whole numbers only. Write the declaration statements to
create the necessary procedure-level variables.
· Write an assignment statement that adds the contents of the
sales1 variable to the contents of the sales2 variable and then
assigns the sum to an existing variable named total Sales. All of
the variables have the Decimal data type.
· Write the statement to declare a procedure-level named
constant named TaxRate whose value is .2. The named constant
should have the Double data type.
· Write the assignment statement to assign the string Dell to the
string variable compType.
· Write the assignment statement to store the contents of the
unitsTextBox in an Integer variable named numberOfUnits.
· Write the assignment statement to assign the contents of an
Integer variable named numberOfUnits to the unitsLabel.
· Write the statement to declare a named constant named
BonusRate whose value is .05. The named constant should have
the Decimal data type.
· Write the statement to declare a String variable that can be
used by two procedures in the same form. Name the variable
employeeName. Also specify where you will need to enter the
statement and whether the variable is a procedure-level or field
level variable.
· Write the statement to assign to the payLabel the value stored
in a Decimal variable named grossPay. The value should be
displayed with a dollar sign and two decimal places.
· Write the statement to add together the contents of two
Decimal variables named westSales and eastSales and then
assign the sum to a Decimal variable named totalSales
.
· Write two versions of an assignment statement that multiplies
the contents of the salary variable by the number 1.5 and then
assigns the result to the salary variable. The salary variable has
the Decimal data type. Use the standard multiplication and
assignment operators in one of the statements. Use the
appropriate combined assignment operator in the other
statement.
Chapter 3
Processing Data
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Topics3.1 Reading Input with TextBox Controls3.2 A First
Look at Variables3.3 Numeric Data Type and Variables3.4
Performing Calculations3.5 Inputting and Outputting Numeric
Values3.6 Formatting Numbers with the ToString Method3.7
Simple Exception Handling3.8 Using Named Constants3.9
Declaring Variables as Fields3.10 Using the Math Class3.11
More GUI Details3.12 Using the Debugger to Locate Logic
Errors
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
3.1 Reading Input with TextBox ControlTextBox controla
rectangular area can accept keyboard input from the userlocates
in the Common Control group of the Toolboxdouble click to add
it to the formdefault name is textBoxn
where n is 1, 2, 3, …
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
The Text PropertyA TextBox controls Text property stores the
user inputsText property accepts only string values, e.g.
textBox1.Text = "Hello";To clear the content of a TextBox
control, assign an empty string("")
textBox1.Text = "";
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
3.2 A First Look at VariablesA variable is a storage location in
memoryVariable name represents the memory locationIn C#,
you must declare a variable in a program before using it to store
dataThe syntax to declare variables is:
DataType VaraibleName;
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Data TypesA C# variable must be declared with a proper data
typeThe data type specifies the type of data a variable can
holdC# provides many data type known as primitive data types
they store fundamental types of datasuch as strings and integers
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Variable NamesA variable name identifies a variableAlways
choose a meaningful name for variablesBasic naming
conventions are:the first character must be a letter (upper or
lowercase) or an underscore (_)the name cannot contain
spacesdo not use C# keywords or reserved words
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
String VariablesString is a combination of characters A variable
of the string data type can hold any combination of characters,
such as names, phone numbers, and social security
numbersValue of a string variable is assigned on the right of =
operator surrounded by a pair of double quotes:
productDescription = "Italian Espresso Machine";
The following assigns the productDescription string to a Label
control named productLabel:
productLabel = productDescription;
You can also display a string variable in a Message Box:
MessageBox.Show(productDescription);
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
String ConcatenationConcatenation is the appending of one
string to the end of another stringC# uses + operator for
concatenation:
string message;
Message = "Hello " + "world";
Concatenation can happen between a string and another data
typeint and stringdouble and string
12 + " apples";
"Total is " + 25.75;
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Declaring Variables Before Using ThemYou can declare
variables and use them later
private void showNameButton_Click(object sender,
EventArgs e)
{
// Declare a string variable to hold the full name.
string fullName;
// Combine the names, with a space between them.
Assign the
// result to the fullName variable.
fullName = firstNameTextBox.Text + " " +
lastNameTextBox.Text;
// Display the fullName variable in the fullNameLabel
control.
fullNameLabel.Text = fullName;
}
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Local Variables and ScopeA local variable belongs to the
method in which it was declaredOnly statements inside that
method can access the variableScope describes the part of a
program in which a variable may be accessedLifetime of a
variable is the time period during which the variable exists in
memory while the program is executing
Copyright © 2017 Pearson Education, Inc.
private void firstButton_Click(object sender, EventArgs e)
{
string myName;
myName = nameTextBox.Text;
}
private void secondButton_Click(object sender, EventArgs e)
{
outputLabel.Text = myName;
}
ERROR!
Copyright © 2017 Pearson Education, Inc.
Rules of VariablesYou can assign a value to a variable only if
the value is compatible with the variable's data type
string employeeID;
employeeID = 125;
A variable holds one value at a timeIn C#, a variable must be
assigned a value before it can be used. You can initialize the
variable with a value when you declare it.
string productDescription = "Chocolate Truffle";
Multiple variables with the same type may be declared with one
statement
string lastName, firstName, middleName;
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
3.3 Numeric Data Types and VariablesIf you need to store a
number in a variable and use the number in a mathematical
operation, the variable must be of a numeric data
typeCommonly used C# numeric data types:int: whole number
in the range of -2,147,483,648 to 2,147,483,647double: real
numbers including numbers with fractional partsNumeric
literals is a number that is written into a program's code:
int hoursWorked = 40;
Or
double temperature = 87.6;
The value cannot be surrounded by quotes
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
The decimal Data TypeIn C#, the decimal keyword indicates a
128-bit data type Compared to double types, it has more
precision and a smaller range, which makes it appropriate for
financial and monetary calculations.Be sure to add the letter M
(or m) to a decimal value:
decimal payRate = 28.75m;
decimal price = 8.95M;
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Explicit Conversion with Cast OperatorsC# allows you to
explicitly convert among types, which is known as type
castingYou can use the cast operator which is simply a pair of
parentheses with the type keyword in it
Copyright © 2017 Pearson Education, Inc.
int wholeNumber;
decimal moneyNumber = 4500m;
wholeNumber = (int) moneynumber;
double realNUmber;
decimal moneyNUmber = 625.70m;
realNumber = (double) moneyNumber;
Copyright © 2017 Pearson Education, Inc.
3.4 Performing CalculationsBasic calculations such as
arithmetic calculation can be performed by math operators
Copyright © 2017 Pearson Education, Inc.OperatorName of the
operatorDescription+AdditionAdds two numbers-
SubtractionSubtracts one number from
another*MultiplicationMultiplies one number by
another/DivisionDivides one number by another and gives the
quotient%ModulusDivides one number by another and gives the
remainder
Copyright © 2017 Pearson Education, Inc.
Rules for Performing CalculationsA math expression performs a
calculation and gives a value
int x = 5, y = 4;
MessageBox.Show((x+y).ToString());Be sure to follow the
order of operations and group with parentheses if necessary
result = (a + b) / 4;In a calculation of mixed data type, the data
type of the result is determined by:When an operation involves
an int and a double, int is treated as double and the result is
doubleWhen an operation involves an int and a decimal, int is
treated as decimal and the result is decimalAn operation
involving a double and a decimal is not allowed.
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Integer DivisionWhen you divide an integer by an integer in C#,
the result is always given as an integer. The result of the
following is 2.
int x = 7, y = 3;
MessageBox.Show((x / y).ToString());
This is known as integer division. To avoid it:
int x = 7, y = 3;
MessageBox.Show(((double) x / (double) y).ToString());
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
3.5 Inputting and Outputting Numeric ValuesInput collected
from the keyboard are considered combinations of characters (or
string literals) even if they look like a number to youA TextBox
control reads keyboard input, such as 25.65. However, the
TextBox treats it as a string, not a number.In C#, use the
following Parse methods to convert string to numeric data
typesint.Parsedouble.Parsedecimal.Parse
Examples:
int hoursWorked = int.Parse(hoursWorkedTextBox1.Text);
double temperature = double.Parse(temperatureTextBox.Text);
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Displaying Numeric ValuesThe Text property of a control only
accepts string literalsTo display a number in a TextBox or Label
control requires you to convert a numeric data to string typeIn
C#, all variables work with ToString method that can convert
variables' values to string:
decimal grossPay = 1550.0m;
grossPayLabel.Text = grossPay.ToString();
int myNumber = 123;
MessageBox.Show(myNumber.ToString());
Another option is "implicit string conversion with the +
operator":
int idNumber = 1044;
String output = "Your ID number is " + idNumber;
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
3.6 Formatting Numbers with the ToString MethodThe ToString
method can optionally format a number to appear in a specific
wayThe following table lists the "format strings" and how they
work with sample outputs
Copyright © 2017 Pearson Education, Inc.Format
StringDescriptionNumberToString()Result"N" or "n"Number
format12.3ToString("n3")12.300"F" or "f"Fixed-point scientific
format123456.0ToString("f2")123456.00"E" or "e"Exponential
scientific format123456.0ToString("e3")1.235e+005"C" or
"c"Currency format-1234567.8ToString("C")($1,234,567.80)"P"
or "p"Percentage format.234ToString("P")23.40%
Copyright © 2017 Pearson Education, Inc.
3.7 Simple Exception HandlingAn exception is an unexpected
error that happens while a program is runningIf an exception is
not handled by the program, the program will abruptly haltC#
allows you to write codes that responds to exceptions. Such
codes are known as exception handlers.In C# the structure is
called a try-catch statement
try { }
catch { }
The try block is where you place the statements that could have
exceptionThe catch block is where you place statements as
response to the exception when it happens
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Throwing an ExceptionIn the following example, the user may
entered invalid data (e.g. null) to the milesText control. In this
case, an exception happens (which is commonly said to "throw
an exception").The program then jumps to the catch block.You
can use the following
to display an exception's
default error message:
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
Copyright © 2017 Pearson Education, Inc.
try
{
double miles;
double gallons;
double mpg;
miles = double.Parse(milesTextBox.Text);
gallons = double.Parse(gallonsTextBox.Text);
mpg = miles / gallons;
mpgLabel.Text = mpg.ToString();
}
catch
{
MessageBox.Show("Invalid data was entered.");
}
Copyright © 2017 Pearson Education, Inc.
3.8 Using Named ConstantsA number constant is a name that
represents a value that cannot be changed during the program's
executionIn C# a constant can be declared by const keyword
const double INTEREST_RATE = 0.129;
Writing the name of a constant in uppercase letters is traditional
in many programming languages, but is not a requirement.
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
3.9 Declaring Variables as FieldsA field is a variable that is
declared at the class levelIt is declared inside the class, but not
inside of any methodA field is a special type of variableA
field's scope is the entire
classIn the Field Demo application,
the name variable is a field
Copyright © 2017 Pearson Education, Inc.
public partial class Form1 : Form
{
// Declare a private field to hold a name.
private string name = "Charles";
public Form1()
{
InitializeComponent();
}
private void showNameButton_Click(object sender, EventArgs
e)
{
MessageBox.Show(name);
}
private void chrisButton_Click(object sender, EventArgs e)
{
name = "Chris";
}
private void carmenButton_Click(object sender, EventArgs e)
{
name = "Carmen";
}
}The name field is created in
memory when the Form1 form
is created
private string name = "Charles";
Copyright © 2017 Pearson Education, Inc.
3.10 Using the Math ClassThe .NET Framework's Math class
provides several methods for performing complex mathematical
calculationsMath.Sqrt(x): returns the square root of x (a
double).Math.Pow(x, y): returns the value of x raised to the
power of y. Both x and y are double.There are two predefined
constants:Math.PI: represents the ratio of the circumference of a
circle to its diameter.Math.E: represents the natural logarithmic
base
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
3.11 More GUI Details – Tab OrderWhen an application is
running, one of the form's controls always has the focusFocus
means a control receives the user's keyboard inputWhen a
button is focused, pressing the Enter key can execute the
button's Click event handlerThe order in which controls
receives the focus is called the tab order When the user presses
the tab key to select controls, the program will follow the tab
orderThe TabIndex property contains a numeric value indicating
the control's position in the tab orderThe value starts with 0.
The index of first control is 0, the nth control is n-1.
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Tab Order (Cont'd)To set the tab order of a control, click Tab
Order on the View menu. This activates the tab-order selection
mode on the form.Simply click the controls with the mouse in
the order you want.Notice that Label controls do not accept
input from the keyboard. They cannot receive focus. Their
TabIndex values are irrelevant
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Tab Order (Cont'd)You can use the Focus method to change the
focus using the following syntax
ControlName.Focus();
The following changes the focus to nameTextBox when the user
clicks clearButton:
private void clearButton_Click(object sender, EventArgs e)
{
nameTextBox.Focus();
}
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Assign Keyboard Access Key to ButtonsAn access key (or
mnemonic) is a key that is pressed in combination with the Alt
key to quickly access a controlYou can assign an access key to
a button's Text property by adding an ampersand (&) before a
letter
E&xit
The user can use a keystroke Alt + X or Alt + x.Access key does
not distinguish between uppercase and lowercase
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Setting ColorsForms and most controls have a BackColor
propertyControls that can display Text also have a ForeColor
propertyThese color-related properties support a drop-down list
of colorsThe list has tree tabs: Custom: display a color
paletteWeb: list colors displayed with consistency in Web
browsersSystem: list colors defined in current WindowsYou can
set colors in color The .NET Framework provides numerous
values that represent colors
messageLable.BackColor = Color.Black;
messageLable.ForeColor = Color.Yellow;
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Background Images for FormsA Form has a property named
BackgroundImage that is similar to the Image property of a
PictureBox.Simply import an image to the Select Resource
windowA Form also has a BackgroundImageLayout property
that is similar to the SizeMode property of a PictureBox.Choose
from one of the following options
Copyright © 2017 Pearson Education, Inc.
Tile
Center
None
Stretch
Zoom
Copyright © 2017 Pearson Education, Inc.
GroupBoxes vs. PanelsA GroupBox control is a container with a
thin border and an optional title that can hold other controlsA
Panel control is also a container that can hold other
controlsThere are several primary differences between a Panel
and GroupBox:A panel cannot display a title and does not have
a Text property, but a GroupBox supports these two
properties.A panel's border can be specified by its BorderStyle
property, while the GroupBox cannot be
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
3.12 Using the Debugger to Locate Logic ErrorsA logic error is
a mistake that does not prevent an application from running, but
causes the application to produce incorrect results.Mathematical
errorsAssigning a value to the wrong variableAssigning the
wrong value to a variableetc.Finding and fixing a logic error
usually requires a bit of detective work.Visual Studio provides
debugging tools that make locating logic errors easier.
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
BreakpointsA breakpoint is a line you select in your source
code. When the application is running and it reaches a
breakpoint, the application pauses and enters break mode. While
the application is paused, you may examine variable contents
and the values stored in certain control properties.
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Breakpoints
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Break ModeIn Break mode, to examine the contents of a
variable or control property, hover the cursor over the variable
or the property's name in the Code editor.
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Autos, Locals, and Watch WindowsThe Autos window displays
a list of the variables appearing in the current statement, the
three statements before, and the three statements after the
current statement. The current value and the data type of each
variable are also displayed.The Locals window displays a list of
all the variables in the current procedure. The current value and
the data type of each variable are also displayed.The Watch
window allows you to add the names of variables you want to
watch. This window displays only the variables you have added.
Visual Studio lets you open multiple Watch windows.You can
open any of these windows by clicking Debug on the menu bar,
then selecting Windows, and then selecting the window that you
want to open.
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
The Locals Window
Copyright © 2017 Pearson Education, Inc.
Local variables
Current values
Copyright © 2017 Pearson Education, Inc.
Single-SteppingVisual Studio allows you to single-step through
an application's code once its execution has been paused by a
breakpoint. This means that the application's statements execute
one at a time, under your control. After each statement
executes, you can examine variable and property values. This
process allows you to identify the line or lines of code causing
the error.
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
Single-SteppingTo single-step, do any of the following:Press
F11 on the keyboard, orClick the Step Into command on the
toolbar, orClick Debug on the menu bar, and then select Step
Into from the Debug menu
Copyright © 2017 Pearson Education, Inc.
Copyright © 2017 Pearson Education, Inc.
MaciasWinter 2020ENG 107Project #2A Year in Gami.docx

More Related Content

Similar to MaciasWinter 2020ENG 107Project #2A Year in Gami.docx

Naming Standards, Clean Code
Naming Standards, Clean CodeNaming Standards, Clean Code
Naming Standards, Clean CodeCleanestCode
 
Ch-3(b) - Variables and Data types in C++.pptx
Ch-3(b) - Variables and Data types in C++.pptxCh-3(b) - Variables and Data types in C++.pptx
Ch-3(b) - Variables and Data types in C++.pptxChereLemma2
 
C++ Basics introduction to typecasting Webinar Slides 1
C++ Basics introduction to typecasting Webinar Slides 1C++ Basics introduction to typecasting Webinar Slides 1
C++ Basics introduction to typecasting Webinar Slides 1Ali Raza Jilani
 
Core C# Programming Constructs, Part 1
Core C# Programming Constructs, Part 1Core C# Programming Constructs, Part 1
Core C# Programming Constructs, Part 1Vahid Farahmandian
 
Chapter2pp
Chapter2ppChapter2pp
Chapter2ppJ. C.
 
presentation of java fundamental
presentation of java fundamentalpresentation of java fundamental
presentation of java fundamentalGanesh Chittalwar
 
Bt0082 visual basic2
Bt0082 visual basic2Bt0082 visual basic2
Bt0082 visual basic2Techglyphs
 
R Programming: Variables & Data Types
R Programming: Variables & Data TypesR Programming: Variables & Data Types
R Programming: Variables & Data TypesRsquared Academy
 
Visual Basics for Application
Visual Basics for Application Visual Basics for Application
Visual Basics for Application Raghu nath
 
Introduction to Programming Fundamentals 3.pdf
Introduction to Programming Fundamentals 3.pdfIntroduction to Programming Fundamentals 3.pdf
Introduction to Programming Fundamentals 3.pdfAbrehamKassa
 
Python breakdown-workbook
Python breakdown-workbookPython breakdown-workbook
Python breakdown-workbookHARUN PEHLIVAN
 
Dot net programming concept
Dot net  programming conceptDot net  programming concept
Dot net programming conceptsandeshjadhav28
 

Similar to MaciasWinter 2020ENG 107Project #2A Year in Gami.docx (20)

Naming Standards, Clean Code
Naming Standards, Clean CodeNaming Standards, Clean Code
Naming Standards, Clean Code
 
Ch-3(b) - Variables and Data types in C++.pptx
Ch-3(b) - Variables and Data types in C++.pptxCh-3(b) - Variables and Data types in C++.pptx
Ch-3(b) - Variables and Data types in C++.pptx
 
Numerical data.
Numerical data.Numerical data.
Numerical data.
 
C++ Basics introduction to typecasting Webinar Slides 1
C++ Basics introduction to typecasting Webinar Slides 1C++ Basics introduction to typecasting Webinar Slides 1
C++ Basics introduction to typecasting Webinar Slides 1
 
Core C# Programming Constructs, Part 1
Core C# Programming Constructs, Part 1Core C# Programming Constructs, Part 1
Core C# Programming Constructs, Part 1
 
Chapter2pp
Chapter2ppChapter2pp
Chapter2pp
 
Chapter 03
Chapter 03Chapter 03
Chapter 03
 
presentation of java fundamental
presentation of java fundamentalpresentation of java fundamental
presentation of java fundamental
 
Bt0082 visual basic2
Bt0082 visual basic2Bt0082 visual basic2
Bt0082 visual basic2
 
Visual basic
Visual basicVisual basic
Visual basic
 
I x scripting
I x scriptingI x scripting
I x scripting
 
R Programming: Variables & Data Types
R Programming: Variables & Data TypesR Programming: Variables & Data Types
R Programming: Variables & Data Types
 
Sharbani bhattacharya VB Structures
Sharbani bhattacharya VB StructuresSharbani bhattacharya VB Structures
Sharbani bhattacharya VB Structures
 
Visual Basics for Application
Visual Basics for Application Visual Basics for Application
Visual Basics for Application
 
Introduction to Programming Fundamentals 3.pdf
Introduction to Programming Fundamentals 3.pdfIntroduction to Programming Fundamentals 3.pdf
Introduction to Programming Fundamentals 3.pdf
 
Python breakdown-workbook
Python breakdown-workbookPython breakdown-workbook
Python breakdown-workbook
 
Dot net programming concept
Dot net  programming conceptDot net  programming concept
Dot net programming concept
 
unit 1 (1).pptx
unit 1 (1).pptxunit 1 (1).pptx
unit 1 (1).pptx
 
Chapter 2- Prog101.ppt
Chapter 2- Prog101.pptChapter 2- Prog101.ppt
Chapter 2- Prog101.ppt
 
Naming Conventions
Naming ConventionsNaming Conventions
Naming Conventions
 

More from croysierkathey

1.  Discuss the organization and the family role in every one of the.docx
1.  Discuss the organization and the family role in every one of the.docx1.  Discuss the organization and the family role in every one of the.docx
1.  Discuss the organization and the family role in every one of the.docxcroysierkathey
 
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docxcroysierkathey
 
1.Purpose the purpose of this essay is to spread awareness .docx
1.Purpose the purpose of this essay is to spread awareness .docx1.Purpose the purpose of this essay is to spread awareness .docx
1.Purpose the purpose of this essay is to spread awareness .docxcroysierkathey
 
1.  Tell us why it is your favorite film.2.  Talk about the .docx
1.  Tell us why it is your favorite film.2.  Talk about the .docx1.  Tell us why it is your favorite film.2.  Talk about the .docx
1.  Tell us why it is your favorite film.2.  Talk about the .docxcroysierkathey
 
1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docxcroysierkathey
 
1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docxcroysierkathey
 
1.Some say that analytics in general dehumanize managerial activitie.docx
1.Some say that analytics in general dehumanize managerial activitie.docx1.Some say that analytics in general dehumanize managerial activitie.docx
1.Some say that analytics in general dehumanize managerial activitie.docxcroysierkathey
 
1.What is the psychological term for the symptoms James experiences .docx
1.What is the psychological term for the symptoms James experiences .docx1.What is the psychological term for the symptoms James experiences .docx
1.What is the psychological term for the symptoms James experiences .docxcroysierkathey
 
1.Write at least 500 words discussing the benefits of using R with H.docx
1.Write at least 500 words discussing the benefits of using R with H.docx1.Write at least 500 words discussing the benefits of using R with H.docx
1.Write at least 500 words discussing the benefits of using R with H.docxcroysierkathey
 
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docxcroysierkathey
 
1.  Discuss the cultural development of the Japanese and the Jewis.docx
1.  Discuss the cultural development of the Japanese and the Jewis.docx1.  Discuss the cultural development of the Japanese and the Jewis.docx
1.  Discuss the cultural development of the Japanese and the Jewis.docxcroysierkathey
 
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
1.  Discuss at least 2  contextual factors(family, peers,  school,.docxcroysierkathey
 
1.Write at least 500 words in APA format discussing how to use senti.docx
1.Write at least 500 words in APA format discussing how to use senti.docx1.Write at least 500 words in APA format discussing how to use senti.docx
1.Write at least 500 words in APA format discussing how to use senti.docxcroysierkathey
 
1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docxcroysierkathey
 
1.What are social determinants of health  Explain how social determ.docx
1.What are social determinants of health  Explain how social determ.docx1.What are social determinants of health  Explain how social determ.docx
1.What are social determinants of health  Explain how social determ.docxcroysierkathey
 
1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docxcroysierkathey
 
1.What are barriers to listening2.Communicators identif.docx
1.What are barriers to listening2.Communicators identif.docx1.What are barriers to listening2.Communicators identif.docx
1.What are barriers to listening2.Communicators identif.docxcroysierkathey
 
1.Timeline description and details There are multiple way.docx
1.Timeline description and details There are multiple way.docx1.Timeline description and details There are multiple way.docx
1.Timeline description and details There are multiple way.docxcroysierkathey
 
1.The PresidentArticle II of the Constitution establishe.docx
1.The PresidentArticle II of the Constitution establishe.docx1.The PresidentArticle II of the Constitution establishe.docx
1.The PresidentArticle II of the Constitution establishe.docxcroysierkathey
 
1.What other potential root causes might influence patient fal.docx
1.What other potential root causes might influence patient fal.docx1.What other potential root causes might influence patient fal.docx
1.What other potential root causes might influence patient fal.docxcroysierkathey
 

More from croysierkathey (20)

1.  Discuss the organization and the family role in every one of the.docx
1.  Discuss the organization and the family role in every one of the.docx1.  Discuss the organization and the family role in every one of the.docx
1.  Discuss the organization and the family role in every one of the.docx
 
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
1.  Compare and contrast DEmilios Capitalism and Gay Identity .docx
 
1.Purpose the purpose of this essay is to spread awareness .docx
1.Purpose the purpose of this essay is to spread awareness .docx1.Purpose the purpose of this essay is to spread awareness .docx
1.Purpose the purpose of this essay is to spread awareness .docx
 
1.  Tell us why it is your favorite film.2.  Talk about the .docx
1.  Tell us why it is your favorite film.2.  Talk about the .docx1.  Tell us why it is your favorite film.2.  Talk about the .docx
1.  Tell us why it is your favorite film.2.  Talk about the .docx
 
1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx1.What are the main issues facing Fargo and Town Manager Susan.docx
1.What are the main issues facing Fargo and Town Manager Susan.docx
 
1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx1.Writing Practice in Reading a PhotographAttached Files.docx
1.Writing Practice in Reading a PhotographAttached Files.docx
 
1.Some say that analytics in general dehumanize managerial activitie.docx
1.Some say that analytics in general dehumanize managerial activitie.docx1.Some say that analytics in general dehumanize managerial activitie.docx
1.Some say that analytics in general dehumanize managerial activitie.docx
 
1.What is the psychological term for the symptoms James experiences .docx
1.What is the psychological term for the symptoms James experiences .docx1.What is the psychological term for the symptoms James experiences .docx
1.What is the psychological term for the symptoms James experiences .docx
 
1.Write at least 500 words discussing the benefits of using R with H.docx
1.Write at least 500 words discussing the benefits of using R with H.docx1.Write at least 500 words discussing the benefits of using R with H.docx
1.Write at least 500 words discussing the benefits of using R with H.docx
 
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
1.What is Starbucks’ ROA for 2012, 2011, and 2010 Why might focusin.docx
 
1.  Discuss the cultural development of the Japanese and the Jewis.docx
1.  Discuss the cultural development of the Japanese and the Jewis.docx1.  Discuss the cultural development of the Japanese and the Jewis.docx
1.  Discuss the cultural development of the Japanese and the Jewis.docx
 
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
1.  Discuss at least 2  contextual factors(family, peers,  school,.docx
 
1.Write at least 500 words in APA format discussing how to use senti.docx
1.Write at least 500 words in APA format discussing how to use senti.docx1.Write at least 500 words in APA format discussing how to use senti.docx
1.Write at least 500 words in APA format discussing how to use senti.docx
 
1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx1.The following clause was added to the Food and Drug Actthe S.docx
1.The following clause was added to the Food and Drug Actthe S.docx
 
1.What are social determinants of health  Explain how social determ.docx
1.What are social determinants of health  Explain how social determ.docx1.What are social determinants of health  Explain how social determ.docx
1.What are social determinants of health  Explain how social determ.docx
 
1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx1.This week, we’ve been introduced to the humanities and have ta.docx
1.This week, we’ve been introduced to the humanities and have ta.docx
 
1.What are barriers to listening2.Communicators identif.docx
1.What are barriers to listening2.Communicators identif.docx1.What are barriers to listening2.Communicators identif.docx
1.What are barriers to listening2.Communicators identif.docx
 
1.Timeline description and details There are multiple way.docx
1.Timeline description and details There are multiple way.docx1.Timeline description and details There are multiple way.docx
1.Timeline description and details There are multiple way.docx
 
1.The PresidentArticle II of the Constitution establishe.docx
1.The PresidentArticle II of the Constitution establishe.docx1.The PresidentArticle II of the Constitution establishe.docx
1.The PresidentArticle II of the Constitution establishe.docx
 
1.What other potential root causes might influence patient fal.docx
1.What other potential root causes might influence patient fal.docx1.What other potential root causes might influence patient fal.docx
1.What other potential root causes might influence patient fal.docx
 

Recently uploaded

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 

Recently uploaded (20)

BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

MaciasWinter 2020ENG 107Project #2A Year in Gami.docx

  • 1. Macias Winter 2020 ENG 107 Project #2 A Year in Gaming (100 points) For this project, you will create a digital portfolio of the games that were released on a certain year in gaming history. I will assign these years in class to avoid duplicates. Once you have your year, research the games that were released then. You will then create a digital portrait of that year and group the games into categories based off what you notice about these games. Are there any similarities? Were there any particular world events that might have inspired these? (Games take years to make so you might look back over the previous two to five years for answers to this.) Were there any innovations to the gaming world that helped usher in these types of games? What consoles were popular at the time? What were the top selling games? Who are the game makers targeting as potential gamers with these games? Look for interesting trends, moments, and other facts to add depth to your project. The answers to these questions and your groupings then need to be presented in a digital format. You can create a Powerpoint or Prezi presentation or you might choose to create a Tumblr, Instagram, Twitter, blog, WordPress, Pinterest, etc. account or even create a YouTube video for your year. If what you want to do isn’t listed- ask me. Somewhere in the project, you must include the following:
  • 2. · Your year · Visual media · Answers to above questions answered fully · Games categorized · Your name and class · Organization · A minimum of 1,200 words combined · Creativity and originality Important Dates Tuesday, February 4th - Peer Workshop (digital or physical draft due in class) First draft due to BlackBoard by 11:59pm Thursday, February 13th- Final draft due to BlackBoard by 11:59pm Either upload and attach your project or send me a link in the submission text box. Your assigned year: ___________ · A procedure needs to store an inventory item’s name, height, and weight. The height may have a decimal place. The weight will be whole numbers only. Write the declaration statements to create the necessary procedure-level variables. · Write an assignment statement that adds the contents of the sales1 variable to the contents of the sales2 variable and then assigns the sum to an existing variable named total Sales. All of the variables have the Decimal data type.
  • 3. · Write the statement to declare a procedure-level named constant named TaxRate whose value is .2. The named constant should have the Double data type. · Write the assignment statement to assign the string Dell to the string variable compType. · Write the assignment statement to store the contents of the unitsTextBox in an Integer variable named numberOfUnits. · Write the assignment statement to assign the contents of an Integer variable named numberOfUnits to the unitsLabel. · Write the statement to declare a named constant named BonusRate whose value is .05. The named constant should have the Decimal data type.
  • 4. · Write the statement to declare a String variable that can be used by two procedures in the same form. Name the variable employeeName. Also specify where you will need to enter the statement and whether the variable is a procedure-level or field level variable. · Write the statement to assign to the payLabel the value stored in a Decimal variable named grossPay. The value should be displayed with a dollar sign and two decimal places. · Write the statement to add together the contents of two Decimal variables named westSales and eastSales and then assign the sum to a Decimal variable named totalSales . · Write two versions of an assignment statement that multiplies the contents of the salary variable by the number 1.5 and then assigns the result to the salary variable. The salary variable has the Decimal data type. Use the standard multiplication and assignment operators in one of the statements. Use the appropriate combined assignment operator in the other statement.
  • 5. Chapter 3 Processing Data Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Topics3.1 Reading Input with TextBox Controls3.2 A First Look at Variables3.3 Numeric Data Type and Variables3.4 Performing Calculations3.5 Inputting and Outputting Numeric Values3.6 Formatting Numbers with the ToString Method3.7 Simple Exception Handling3.8 Using Named Constants3.9 Declaring Variables as Fields3.10 Using the Math Class3.11 More GUI Details3.12 Using the Debugger to Locate Logic Errors Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. 3.1 Reading Input with TextBox ControlTextBox controla rectangular area can accept keyboard input from the userlocates in the Common Control group of the Toolboxdouble click to add it to the formdefault name is textBoxn where n is 1, 2, 3, … Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc.
  • 6. The Text PropertyA TextBox controls Text property stores the user inputsText property accepts only string values, e.g. textBox1.Text = "Hello";To clear the content of a TextBox control, assign an empty string("") textBox1.Text = ""; Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. 3.2 A First Look at VariablesA variable is a storage location in memoryVariable name represents the memory locationIn C#, you must declare a variable in a program before using it to store dataThe syntax to declare variables is: DataType VaraibleName; Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Data TypesA C# variable must be declared with a proper data typeThe data type specifies the type of data a variable can holdC# provides many data type known as primitive data types they store fundamental types of datasuch as strings and integers Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Variable NamesA variable name identifies a variableAlways choose a meaningful name for variablesBasic naming conventions are:the first character must be a letter (upper or lowercase) or an underscore (_)the name cannot contain spacesdo not use C# keywords or reserved words Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc.
  • 7. String VariablesString is a combination of characters A variable of the string data type can hold any combination of characters, such as names, phone numbers, and social security numbersValue of a string variable is assigned on the right of = operator surrounded by a pair of double quotes: productDescription = "Italian Espresso Machine"; The following assigns the productDescription string to a Label control named productLabel: productLabel = productDescription; You can also display a string variable in a Message Box: MessageBox.Show(productDescription); Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. String ConcatenationConcatenation is the appending of one string to the end of another stringC# uses + operator for concatenation: string message; Message = "Hello " + "world"; Concatenation can happen between a string and another data typeint and stringdouble and string 12 + " apples"; "Total is " + 25.75; Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc.
  • 8. Declaring Variables Before Using ThemYou can declare variables and use them later private void showNameButton_Click(object sender, EventArgs e) { // Declare a string variable to hold the full name. string fullName; // Combine the names, with a space between them. Assign the // result to the fullName variable. fullName = firstNameTextBox.Text + " " + lastNameTextBox.Text; // Display the fullName variable in the fullNameLabel control. fullNameLabel.Text = fullName; } Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Local Variables and ScopeA local variable belongs to the method in which it was declaredOnly statements inside that method can access the variableScope describes the part of a program in which a variable may be accessedLifetime of a variable is the time period during which the variable exists in memory while the program is executing
  • 9. Copyright © 2017 Pearson Education, Inc. private void firstButton_Click(object sender, EventArgs e) { string myName; myName = nameTextBox.Text; } private void secondButton_Click(object sender, EventArgs e) { outputLabel.Text = myName; } ERROR! Copyright © 2017 Pearson Education, Inc. Rules of VariablesYou can assign a value to a variable only if the value is compatible with the variable's data type string employeeID; employeeID = 125; A variable holds one value at a timeIn C#, a variable must be assigned a value before it can be used. You can initialize the variable with a value when you declare it. string productDescription = "Chocolate Truffle"; Multiple variables with the same type may be declared with one statement string lastName, firstName, middleName; Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc.
  • 10. 3.3 Numeric Data Types and VariablesIf you need to store a number in a variable and use the number in a mathematical operation, the variable must be of a numeric data typeCommonly used C# numeric data types:int: whole number in the range of -2,147,483,648 to 2,147,483,647double: real numbers including numbers with fractional partsNumeric literals is a number that is written into a program's code: int hoursWorked = 40; Or double temperature = 87.6; The value cannot be surrounded by quotes Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. The decimal Data TypeIn C#, the decimal keyword indicates a 128-bit data type Compared to double types, it has more precision and a smaller range, which makes it appropriate for financial and monetary calculations.Be sure to add the letter M (or m) to a decimal value: decimal payRate = 28.75m; decimal price = 8.95M; Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Explicit Conversion with Cast OperatorsC# allows you to explicitly convert among types, which is known as type castingYou can use the cast operator which is simply a pair of parentheses with the type keyword in it Copyright © 2017 Pearson Education, Inc. int wholeNumber;
  • 11. decimal moneyNumber = 4500m; wholeNumber = (int) moneynumber; double realNUmber; decimal moneyNUmber = 625.70m; realNumber = (double) moneyNumber; Copyright © 2017 Pearson Education, Inc. 3.4 Performing CalculationsBasic calculations such as arithmetic calculation can be performed by math operators Copyright © 2017 Pearson Education, Inc.OperatorName of the operatorDescription+AdditionAdds two numbers- SubtractionSubtracts one number from another*MultiplicationMultiplies one number by another/DivisionDivides one number by another and gives the quotient%ModulusDivides one number by another and gives the remainder Copyright © 2017 Pearson Education, Inc. Rules for Performing CalculationsA math expression performs a
  • 12. calculation and gives a value int x = 5, y = 4; MessageBox.Show((x+y).ToString());Be sure to follow the order of operations and group with parentheses if necessary result = (a + b) / 4;In a calculation of mixed data type, the data type of the result is determined by:When an operation involves an int and a double, int is treated as double and the result is doubleWhen an operation involves an int and a decimal, int is treated as decimal and the result is decimalAn operation involving a double and a decimal is not allowed. Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Integer DivisionWhen you divide an integer by an integer in C#, the result is always given as an integer. The result of the following is 2. int x = 7, y = 3; MessageBox.Show((x / y).ToString()); This is known as integer division. To avoid it: int x = 7, y = 3; MessageBox.Show(((double) x / (double) y).ToString()); Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. 3.5 Inputting and Outputting Numeric ValuesInput collected from the keyboard are considered combinations of characters (or string literals) even if they look like a number to youA TextBox control reads keyboard input, such as 25.65. However, the TextBox treats it as a string, not a number.In C#, use the
  • 13. following Parse methods to convert string to numeric data typesint.Parsedouble.Parsedecimal.Parse Examples: int hoursWorked = int.Parse(hoursWorkedTextBox1.Text); double temperature = double.Parse(temperatureTextBox.Text); Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Displaying Numeric ValuesThe Text property of a control only accepts string literalsTo display a number in a TextBox or Label control requires you to convert a numeric data to string typeIn C#, all variables work with ToString method that can convert variables' values to string: decimal grossPay = 1550.0m; grossPayLabel.Text = grossPay.ToString(); int myNumber = 123; MessageBox.Show(myNumber.ToString()); Another option is "implicit string conversion with the + operator": int idNumber = 1044; String output = "Your ID number is " + idNumber; Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. 3.6 Formatting Numbers with the ToString MethodThe ToString method can optionally format a number to appear in a specific wayThe following table lists the "format strings" and how they work with sample outputs Copyright © 2017 Pearson Education, Inc.Format
  • 14. StringDescriptionNumberToString()Result"N" or "n"Number format12.3ToString("n3")12.300"F" or "f"Fixed-point scientific format123456.0ToString("f2")123456.00"E" or "e"Exponential scientific format123456.0ToString("e3")1.235e+005"C" or "c"Currency format-1234567.8ToString("C")($1,234,567.80)"P" or "p"Percentage format.234ToString("P")23.40% Copyright © 2017 Pearson Education, Inc. 3.7 Simple Exception HandlingAn exception is an unexpected error that happens while a program is runningIf an exception is not handled by the program, the program will abruptly haltC# allows you to write codes that responds to exceptions. Such codes are known as exception handlers.In C# the structure is called a try-catch statement try { } catch { } The try block is where you place the statements that could have exceptionThe catch block is where you place statements as response to the exception when it happens Copyright © 2017 Pearson Education, Inc.
  • 15. Copyright © 2017 Pearson Education, Inc. Throwing an ExceptionIn the following example, the user may entered invalid data (e.g. null) to the milesText control. In this case, an exception happens (which is commonly said to "throw an exception").The program then jumps to the catch block.You can use the following to display an exception's default error message: catch (Exception ex) { MessageBox.Show(ex.Message); } Copyright © 2017 Pearson Education, Inc. try { double miles; double gallons; double mpg; miles = double.Parse(milesTextBox.Text); gallons = double.Parse(gallonsTextBox.Text); mpg = miles / gallons; mpgLabel.Text = mpg.ToString(); } catch { MessageBox.Show("Invalid data was entered."); } Copyright © 2017 Pearson Education, Inc.
  • 16. 3.8 Using Named ConstantsA number constant is a name that represents a value that cannot be changed during the program's executionIn C# a constant can be declared by const keyword const double INTEREST_RATE = 0.129; Writing the name of a constant in uppercase letters is traditional in many programming languages, but is not a requirement. Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. 3.9 Declaring Variables as FieldsA field is a variable that is declared at the class levelIt is declared inside the class, but not inside of any methodA field is a special type of variableA field's scope is the entire classIn the Field Demo application, the name variable is a field Copyright © 2017 Pearson Education, Inc. public partial class Form1 : Form { // Declare a private field to hold a name. private string name = "Charles"; public Form1() { InitializeComponent(); } private void showNameButton_Click(object sender, EventArgs e) { MessageBox.Show(name); }
  • 17. private void chrisButton_Click(object sender, EventArgs e) { name = "Chris"; } private void carmenButton_Click(object sender, EventArgs e) { name = "Carmen"; } }The name field is created in memory when the Form1 form is created private string name = "Charles"; Copyright © 2017 Pearson Education, Inc. 3.10 Using the Math ClassThe .NET Framework's Math class provides several methods for performing complex mathematical calculationsMath.Sqrt(x): returns the square root of x (a double).Math.Pow(x, y): returns the value of x raised to the power of y. Both x and y are double.There are two predefined constants:Math.PI: represents the ratio of the circumference of a circle to its diameter.Math.E: represents the natural logarithmic base Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. 3.11 More GUI Details – Tab OrderWhen an application is running, one of the form's controls always has the focusFocus means a control receives the user's keyboard inputWhen a button is focused, pressing the Enter key can execute the
  • 18. button's Click event handlerThe order in which controls receives the focus is called the tab order When the user presses the tab key to select controls, the program will follow the tab orderThe TabIndex property contains a numeric value indicating the control's position in the tab orderThe value starts with 0. The index of first control is 0, the nth control is n-1. Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Tab Order (Cont'd)To set the tab order of a control, click Tab Order on the View menu. This activates the tab-order selection mode on the form.Simply click the controls with the mouse in the order you want.Notice that Label controls do not accept input from the keyboard. They cannot receive focus. Their TabIndex values are irrelevant Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Tab Order (Cont'd)You can use the Focus method to change the focus using the following syntax ControlName.Focus(); The following changes the focus to nameTextBox when the user clicks clearButton: private void clearButton_Click(object sender, EventArgs e) { nameTextBox.Focus(); } Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc.
  • 19. Assign Keyboard Access Key to ButtonsAn access key (or mnemonic) is a key that is pressed in combination with the Alt key to quickly access a controlYou can assign an access key to a button's Text property by adding an ampersand (&) before a letter E&xit The user can use a keystroke Alt + X or Alt + x.Access key does not distinguish between uppercase and lowercase Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Setting ColorsForms and most controls have a BackColor propertyControls that can display Text also have a ForeColor propertyThese color-related properties support a drop-down list of colorsThe list has tree tabs: Custom: display a color paletteWeb: list colors displayed with consistency in Web browsersSystem: list colors defined in current WindowsYou can set colors in color The .NET Framework provides numerous values that represent colors messageLable.BackColor = Color.Black; messageLable.ForeColor = Color.Yellow; Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Background Images for FormsA Form has a property named BackgroundImage that is similar to the Image property of a PictureBox.Simply import an image to the Select Resource windowA Form also has a BackgroundImageLayout property that is similar to the SizeMode property of a PictureBox.Choose
  • 20. from one of the following options Copyright © 2017 Pearson Education, Inc. Tile Center None Stretch Zoom Copyright © 2017 Pearson Education, Inc. GroupBoxes vs. PanelsA GroupBox control is a container with a thin border and an optional title that can hold other controlsA Panel control is also a container that can hold other controlsThere are several primary differences between a Panel and GroupBox:A panel cannot display a title and does not have a Text property, but a GroupBox supports these two properties.A panel's border can be specified by its BorderStyle property, while the GroupBox cannot be Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. 3.12 Using the Debugger to Locate Logic ErrorsA logic error is a mistake that does not prevent an application from running, but causes the application to produce incorrect results.Mathematical errorsAssigning a value to the wrong variableAssigning the wrong value to a variableetc.Finding and fixing a logic error usually requires a bit of detective work.Visual Studio provides debugging tools that make locating logic errors easier. Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc.
  • 21. BreakpointsA breakpoint is a line you select in your source code. When the application is running and it reaches a breakpoint, the application pauses and enters break mode. While the application is paused, you may examine variable contents and the values stored in certain control properties. Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Breakpoints Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Break ModeIn Break mode, to examine the contents of a variable or control property, hover the cursor over the variable or the property's name in the Code editor. Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Autos, Locals, and Watch WindowsThe Autos window displays a list of the variables appearing in the current statement, the three statements before, and the three statements after the current statement. The current value and the data type of each variable are also displayed.The Locals window displays a list of all the variables in the current procedure. The current value and the data type of each variable are also displayed.The Watch window allows you to add the names of variables you want to watch. This window displays only the variables you have added. Visual Studio lets you open multiple Watch windows.You can open any of these windows by clicking Debug on the menu bar,
  • 22. then selecting Windows, and then selecting the window that you want to open. Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. The Locals Window Copyright © 2017 Pearson Education, Inc. Local variables Current values Copyright © 2017 Pearson Education, Inc. Single-SteppingVisual Studio allows you to single-step through an application's code once its execution has been paused by a breakpoint. This means that the application's statements execute one at a time, under your control. After each statement executes, you can examine variable and property values. This process allows you to identify the line or lines of code causing the error. Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc. Single-SteppingTo single-step, do any of the following:Press F11 on the keyboard, orClick the Step Into command on the toolbar, orClick Debug on the menu bar, and then select Step Into from the Debug menu Copyright © 2017 Pearson Education, Inc. Copyright © 2017 Pearson Education, Inc.