Britech College | Resources

UPDATES, SOURCE CODES AND LECTURE NOTES

CSC112 FINAL EXAM

I. Do the following in Console Application

1. Let the user input a grade from 65 to 100 and give the equivalent remark

FAIL = 65-74
FAIR = 75-80
GOOD = 81-85
VERY GOOD = 86 - 90
EXCELLENT = 91-100

2. DISPLAY  SERIES OF EVEN NUMBERS FROM 48-100
3. Let the user input username and password. The user is only allowed to make 4 attempts. If the number of attempts becomes 0, close the program

II. Do the following in Windows form

3. Let the user input username and password. The user is only allowed to make 4 attempts (make sure to display the available number of attempts in label) If the number of attempts becomes 0, disable the textboxes and button.

SQL JOINING

create database dbABCorp

create table tblcustomers
(
cid int primary key,
cname varchar (50),
caddress varchar (50),
cgender varchar (50),
)

create table tblproducts
(
pid int primary key,
pname varchar (50),
price float,
quantity int,
)

create table tblorders
(
orid int primary key,
orno int,
cid int foreign key references tblcustomers (cid),
pid int foreign key references tblproducts (pid),
quantity int,
total float,
)

select * from tblorders


insert into tblcustomers values (1,'Remo','Cebu','Male')
insert into tblcustomers values (2,'Jake','Cebu','Male')


insert into tblproducts values (1,'TV',12000,10)
insert into tblproducts values (2,'CELLPHONE',8000,10)
insert into tblproducts values (3,'FAN',1000,10)

select * from tblorders
insert into tblorders (orid,orno,cid,pid,quantity) values  (1,1,1,2,2)

select orid,orno,tblorders.cid,tblcustomers.cname,tblorders.pid,tblproducts.pname,tblproducts.price,tblorders.quantity,(tblorders.quantity*tblproducts.price) as 'Total Amount' from tblorders 
inner join tblcustomers on tblcustomers.cid=tblorders.cid
inner join tblproducts on tblproducts.pid=tblorders.pid

insert into tblorders (orid,orno,cid,pid,quantity) values  (2,2,3,2,2)




JavaScript Code Snippet

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form>
<label>Input First Value</label>
<input type="text" id="text1" /><br/>
<label>Input Second Value</label>
<input type="text" id="text2" /><br/>
<input type="button" onclick="addthis()" value="ADD

NOW"></input>
</form>

<p id="mytext"> This is a text where it will change once you click

the button</p>
<input type="button" onclick="changethis()" value="CLICK TO CHANGE

THE TEXT"></input>
<script type="text/javascript">
function addthis()
{
var num1=document.getElementById("text1").value;
var num2=document.getElementById("text2").value;
var sum=Number(num1)+Number(num2);
document.write(sum);
}
function changethis()
{
document.getElementById("mytext").innerHTML="I am now the

new TEXT.";
}

}
</script>
</body>
</html>

IMS133L QUIZ

I. IDENTIFICATION



1.     An expression which calculates the value of a cell. 
2.     Predefined formulas and are already available in Excel.
3.     An excel function that will help clean up excess whitespaces.
4.     An excel function that will give you how many cells given range contains numbers.
5.     An excel function that will give you the number of cells in a given range that contain characters such as numbers, text, or symbols.
6.     An excel function that will count the number of characters in a single cell
7.     Takes data from two cells and turns it into one.   
8.     To know the number of days between two dates in a spreadsheet.
9.     Know how many work days that range encompasses.
10.  Gives you the square root.
11.  See the current date and time whenever you open a particular worksheet.
12.  Lets you search for specific information in your spreadsheet.

II.
I.                  Formula writing. Write the formula beside each number.  2 points each.
1.      Combine the value in A5 and A6

2.      Give the average from A4 TO A13

3.      Get the length of characters in A6

4.      Get the first 3 letters in A9

5.      Give the sum from A5 TO A20

6.      Give the square root of A4

7.      Round the number in A4 up to 4 digits

8.      Give the maximum value from A6 TO A25

9.      Display the current day and time

10.   Count the number of values in A16 TO A29 (including letters)


CSC113 EXAM

I. IDENTIFICATION


1. A programming model where programs are organized around objects and data rather than action and logic. 
2.  A blueprint of an object that contains variables for storing data and functions to perform operations on the data. 
3. The basic run-time entities of an object oriented system
4. An instance of a class
5. Provides you a generalized view of your classes or objects by providing relevant information
6. Wrapping up a data member and a method together into a single unit 
7. When a class includes a property of another class 
8. One function behaves in different forms.


II. Writing Code

Create a program that ask the details of a Character (NAME, AGE, GENDER,WEAPON,TRIBE) 
AVAILABLE TRIBE NAMES:

LEVI
JUDAH
GAD
ASHER

IF THE TRIBE IS LEVI, ASK FOR THE NAME OF THEIR LEADER,NO OF SOLDIERS
IF THE TRIBE IS JUDAH, ASK FOR THE NAME OF THEIR PET,NAME OF THEIR KING.
IF THE TRIBE IS GAD, ASK FOR THE NAME OF THEIR STRONGEST WARRIOR, FAVORITE WEAPON
IF THE TRIBE IS ASHER, ASK FOR THE NAME OF THEIR QUEEN, AND THE NAME OF THEIR PRINCESS

NOTE: HANDLE ALL THE ERROR, FOR EXAMPLE, PROMPT THE USER IF THE ENTERED TRIBE IS NOT FOUND.

Design your own class diagram.