comprog
comprog
vb.net
Conditional statements
Looping statements
Looping derive to C language or java
syntax
HCI LECTURE 1:
Lecture Human-Computer Interaction
- A key design activity is to design the user interface
Human-computer interaction (HCI)
- the study of end users and their interaction with computers.
- For every input and output, the developer must consider the interaction between the
user and the computer
- user-interface design is often referred to as dialog design
The field of human-computer interaction investigates how people use computer systems so
that better systems can be designed.
- One aspect is concerned with technological innovation (e.g., better input devices, like
electronic pens, touch screens, etc.)
- The other aspect concerns the element human (e.g., how people reason, solve
problems, and interact with computers) – the most challenging aspect of HCI!
The User Interface
- Many people think of the user interface as a component added to the system near
the end of the development process.
- This view changes as user interfaces become more important and systems become
more interactive.
To the end user, the user interface is the system.
- The user interface is everything the end user comes into contact with while using the
system –
- Physically
- perceptually, and
- conceptually.
- Therefore, consideration of the user interface should come early in the development
process.
Anatomy of a Report
Example 1
Dim intNumSold As Integer
Dim dblTaxRate As Double
declares an Integer variable named intNumSold and a Double variable named db1TaxRate;
the variables are automatically initialized to 0
Example 2
Dim decPay As Decimal
declares a Decimal variable named decPay; the variable is automatically initialized to 0
Example 3
Dim blnInsured As Boolean = True
declares a Boolean variable named blnInsured and initializes it using the keyword True
Example 4
Dim strMsg As String = "Good Night"
declares a String variable named strMsg and initializes it using the string "Good Night"
Syntax
variableName = expression
Note: In each of the following examples, the data type of the expression assigned to the
variable is the same as the data type of the variable itself.
Example 1
intNumber = 25
assigns the integer 25 to the intNumber variable
Example 2
strName = "Karen"
assigns the string "Karen" to the strName variable
Example 3
strCity = txtCity.Text
assigns the string contained in the txtCity control's Text property to the strCity variable
Example 4
dblInterestRate = .09
assigns the Double number .09 to the dblInterestRate variable
Example 5
decTaxRate = .06D
converts the Double number .06 to Decimal and then assigns the result to the decTaxRate
variable
Example 6
dblBonus = dblSales * .05
multiplies the contents of the db1Sales variable by the Double number .05 and then assigns
the result to the db1Bonus variable
Code: Output:
int a = 4, b = 3, c = 10;
int main() {
if (c > (a - b * 5))
printf("c is greater than\n");
else
printf("c is less than\n");
return 0;
}
Code: Output:
#include <stdio.h> 22
46
int x=0, y=0; 612
int main() 820
{ 1030
while (x!=10)
{
x=x+2;
y=y+x;
printf("%d%d\n", x,y);
}
return 0;
}
Code: Output:
#include <stdio.h> 12
34
int main() { 56
int x; 78
9 10
for (x = 1; x <= 10; x = x + 2) {
printf("%d %d\n", x, x + 1);
}
return 0;
}
Code: Output:
#include <stdio.h> 1
2
int x, sum; 3
int main() 4
{ 5
x = 1; 6
sum = 0; 7
do 8
{ 9
sum=sum+x; 10
printf("%d\n",x); The sum is 55
x++;
} while (x <= 10);
printf("The sum is %d",sum);
return 0;
}
Code: Output:
#include <stdio.h> 2
2
int main() 2
2
{
2
int a; 2
for (a = 0; a < 5; a++) 2
{ 2
a = 2; 2
printf("%d\n", a); 2
} 2
2
return 0;
2
} 2
Binary Decimals
1. 1 1. 1
2. 10 2. 10
3. 11 3. 11
4. 100 4. 100
5. 101 5. 101
6. 110 6. 110
7. 111 7. 111
8. 1000 8. 1000
9. 1001 9. 1001
10.1010 10.1010
11.1011 11.1011
12.1100 12.1100
13.1101 13.1101
14.1110 14.1110
15.1111 15.1111
16.10000 16.10000
17.10001 17.10001
18.10010 18.10010
19.10011 19.10011
20.10100 20.10100
21.10101 21.10101
22.10110 22.10110
23.10111 23.10111
24.11000 24.11000
25.11001 25.11001
26.11010 26.11010
27.11011 27.11011
28.11100 28.11100
29.11101 29.11101
30.11110 30.11110
31.11111
Name Syntax
- Do-while do {
// Code to execute repeatedly
} while (condition);
- If-else if (condition) {
// Code to execute if the condition is true
} else {
// Code to execute if the condition is false
}
- Else-if if (condition1) {
// Code to execute if condition1 is true
} else if (condition2) {
// Code to execute if condition2 is true
} else {
// Code to execute if none of the conditions are true
}
https://quizizz.com/join?gc=39 39928296
928296