MID-Exer1-Phonebook Problem: Make A List of 20 People and Their Profile Using The Form To Input Data in MS Access
MID-Exer1-Phonebook Problem: Make A List of 20 People and Their Profile Using The Form To Input Data in MS Access
MID-Exer1-Phonebook Problem: Make A List of 20 People and Their Profile Using The Form To Input Data in MS Access
Problem: Make a list of 20 people and their profile using the Form to input data in MS Access.
MID-SW2-DUQUE
Problem: Show the relationship of 5 Publishers and 15 Books with the use of Query in MS
Access.
Db_Inventory_Duque
Problem: Provide the following and their data type.
tb_supplier
-supno ** AUTO INC
-supname
-supcontact
-supaddress
tb_customer
-custno
AUTO INC
-custlast text 30
-custfirst text 30
-custmid text 5
-custcontact text 50
-custaddress text 50
-custcrlimit decimal (9/2)
-custrefby integer
tb_order
-ordno
AUTO INC
-orddate
-ordprodno
-ordbycust
-ordqty
-ordprice
-orddisc
tb_shipment
-shipno
-shipsupno **
-shipdate
-shipitemno
tb_item
-itemno *** AUTO INC
-itemsupno **
-itemqty
3
-itemdesc
-itemunitprice
tb_product
-prodno
AUTO INC
-proddesc
-prodqty
-produprice
-prodmaterials
Screen Capture
Inventory-Relationship-Duque
Problem: Provide the following
relationship to display the ff:
- Customer (#, Whole name, Address, Contact)
- Order (#, date, Product No., Qty, Order Price)
- Product (Description, Prod Unit Price)
provide:
10 Customers
20 Products
5 orders per customers
Screen Catpure
MID-SW1-DUQUE
Problem: Using C++, identify the age of the user. If age 14 and below, a statement "You need
to seek a parent guidance" should show, 15 to 19, a statement "You are a teenager" should
show, and a statement "Are you sure that you are already (Age)" should show if above 19 yrs
old.
Code:
#include <iostream>
#include <windows.h>
using namespace std;
void gotoxy (int x, int y)
{
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}
int main ()
{
string Name, Address;
int Birth, Age;
system ("color 1F");
gotoxy (1,1);
cout <<
"====================================================================";
gotoxy (1,2);
cout << "
Name :";
gotoxy (1,3);
cout << "
Address :";
gotoxy (1,4);
cout << " Year of Birth :";
gotoxy (22,2);
cin >> Name ;
gotoxy (22,3);
7
MIDTERM-COMPILATION-DUQUE
Problem: Make a compilation of the midterm activities in C++. Provide a menu that will lead the
user to each activity.
Choice 1
Choice 2
Choice 3
Choice 4
10
Choice 5
Choice 6
11
Choice 7
Choice 8
12
Choice 9
Code:
13
#include <iostream>
#include <windows.h>
using namespace std;
void gotoxy(int cols, int rows)
{
COORD coord;
coord.Y = rows;
coord.X = cols;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}
void customerform2()
{
system ("cls");
system ("color f1");
string cname;
string add;
string contnum;
string bday;
string credit;
string ref;
string disc;
gotoxy (17,1);
cout << "====================================================";
gotoxy (33,2);
cout << "D-MALULUGI, Incorporation";
gotoxy (33,3);
cout << "Quezon City Branch";
gotoxy (33,4);
cout << "Customer registration Form";
gotoxy (20,6);
cout << "Customer Name :" << cname;
gotoxy (26,7);
cout << "Address :" << add;
gotoxy (19,8);
cout << "Contact Number :" << contnum;
gotoxy (20,9);
cout << "Date of Birth :" << bday;
gotoxy (48,9);
cout << " Referred By :" << ref;
gotoxy (21,10);
cout << "Credit Limit :" << credit;
gotoxy (47,10);
cout << "Discount Rate :";
gotoxy (17,11);
cout << "====================================================";
gotoxy (18,12);
cout << "Programmed By : Duque, Jerrom Gabriel A.";
gotoxy (24,13);
cout << "Section : FMA22FB1";
14
gotoxy ( 36,6);
cin >> cname;
gotoxy (36,7);
cin >> add;
gotoxy (36,8);
cin >> contnum;
gotoxy (36,9);
cin >> bday;
gotoxy (36,10);
cin >> credit;
gotoxy (63,9);
cin >> ref;
gotoxy (63,10);
cin >> disc;
gotoxy (24,14);
system ("pause");
system ("cls");
system ("color 8F");
gotoxy (17,1);
cout << "====================================================";
gotoxy (33,2);
cout << "D-MALULUGI, Incorporation";
gotoxy (33,3);
cout << "Quezon City Branch";
gotoxy (33,4);
cout << "Customer registration Form";
gotoxy (20,6);
cout << "Customer Name :" << cname;
gotoxy (26,7);
cout << "Address :" << add;
gotoxy (19,8);
cout << "Contact Number :" << contnum;
gotoxy (20,9);
cout << "Date of Birth :" << bday;
gotoxy (48,9);
cout << " Referred By :" << ref;
gotoxy (21,10);
cout << "Credit Limit :" << credit;
gotoxy (47,10);
cout << "Discount Rate :" << disc;
gotoxy (17,11);
cout << "====================================================";
gotoxy (18,12);
cout << "Programmed By : Duque, Jerrom Gabriel A.";
gotoxy (24,13);
cout << "Section : FMA22FB1";
gotoxy (24,14);
15
system ("pause");
}
void song()
{
system ("cls");
cout << "If You See Kay\n\n";
cout << "If you see my friend, doesn't matter where or when, tell me if you see kay";
cout <<"\nIf you see my friend, doesn't matter where or when, tell me if you see kay\n\n";
cout <<"\nShe said I won the battle but I lost the war,";
cout <<"\nAnd now my head is sore,";
cout <<"\nAnd if I try and sail back in she's gonna push me from the shore,";
cout <<"\nNow I won't ever get the time or day,";
cout <<"\nNo way no way no,";
cout <<"\nNot from what I said but from what I didn't say,";
cout <<"\nWhat I didn't say\n\n";
cout <<"\nSo if you see kay will you tell her that I love her,";
cout <<"\nAnd if you see kay let her know I want her back,";
cout <<"\nIf she listens say I miss her,";
cout <<"\nEverything about her,";
cout <<"\nMake sure you say I'm sweet f.a without her,";
cout <<"\nIf you see kay\n\n";
cout <<"\nIf you see my friend, doesn't matter where or when, tell me if you see kay";
cout <<"\nIf you see my friend, doesn't matter where or when, tell me if you see kay\n\n";
cout <<"\nShe got me saying sorry through the door,";
cout <<"\nShe don't care anymore,";
cout <<"\nShe says it's to late now should have thought of this before,";
cout <<"\nBut I aint gonna take this as defeat,";
cout <<"\nNo way no way no,";
cout <<"\nCause I'm gonna shout it out to everyone I, everyone I meet\n\n";
cout <<"\nSo if you see kay will you tell her that I love her,";
cout <<"\nAnd if you see kay let her know I want her back,";
cout <<"\nIf she listens say I miss her,";
cout <<"\nEverything about her,";
cout <<"\nMake sure you say I'm sweet f.a without her,";
cout <<"\nIf you see kay\n\n";
cout <<"\nNow I'm sitting here in disbelief,";
cout <<"\nHow it truly broke my heart to have to watch her leave,";
cout <<"\nBut she was torn between what she wants and what she needs,";
cout <<"\nThey say you love someone enough you've gotta set them free,";
cout <<"\nShe said that she was born to leave this town behind,";
cout <<"\nKnew the truth but still she looked me in the eyes and lied,";
cout <<"\nSaying it's time to cut the ties,";
cout <<"\nTime to say goodbye,";
cout <<"\nSo she left,";
16
cout <<"I\n";
cout <<"Lift up your heart, and hold your head up high\n";
cout <<"Were gonna win, were gonna fly\n";
cout <<"Were gonna reach our lofty dreams\n";
cout <<"Weve got the strength; weve got the mind\n\n";
cout <<"II\n";
cout <<"Weve got the grit and the determination\n";
cout <<"Weve got the courage and the drive\n";
cout <<"We will exceed all expectations\n";
cout <<"Were gonna take them by surprise\n\n";
cout <<"REFRAIN\n";
cout <<"Were on top of the world TIP,\n";
cout <<"Were the tip of the top of the world!\n";
cout <<"Were on top of the world TIP,\n";
cout <<"Were the tip of the top of the world!\n\n";
cout <<"BRIDGE\n";
cout <<"Together we are invincible,\n";
cout <<"United we are strong,\n";
cout <<"We do our very best,\n";
cout <<"On top is where we belong\n\n";
cout <<"REPEAT Stanza II then REFRAIN\n\n";
cout <<"TIP,TIP!\n\n";
system ("pause");
cout <<"Jerrom Duque ref: www.tip.edu.ph\n";
system("pause");
}
void customerform1()
{
system("cls");
system ("color f1");
string cname;
string add;
string contnum;
string bday;
string credit;
string ref;
string disc;
gotoxy (17,1);
cout << "====================================================";
gotoxy (33,2);
cout << "D-MALULUGI, Incorporation";
19
gotoxy (33,3);
cout << "Quezon City Branch";
gotoxy (33,4);
cout << "Customer registration Form";
gotoxy (20,6);
cout << "Customer Name :" << cname;
gotoxy (26,7);
cout << "Address :" << add;
gotoxy (19,8);
cout << "Contact Number :" << contnum;
gotoxy (20,9);
cout << "Date of Birth :" << bday;
gotoxy (48,9);
cout << " Referred By :" << ref;
gotoxy (21,10);
cout << "Credit Limit :" << credit;
gotoxy (47,10);
cout << "Discount Rate :";
gotoxy (17,11);
cout << "====================================================";
gotoxy (18,12);
cout << "Programmed By : Duque, Jerrom Gabriel A.";
gotoxy (24,13);
cout << "Section : FMA22FB1";
gotoxy ( 36,6);
cin >> cname;
gotoxy (36,7);
cin >> add;
gotoxy (36,8);
cin >> contnum;
gotoxy (36,9);
cin >> bday;
gotoxy (36,10);
cin >> credit;
gotoxy (63,9);
cin >> ref;
gotoxy (63,10);
cin >> disc;
gotoxy (24,14);
system ("pause");
}
void bioform2()
{
system("cls");
system ("color 8F");
string gname;
string sname;
string mname;
string dbirth;
20
string pbirth;
string rel;
string age;
string cstatus;
string height;
string gender;
string weight;
string padd;
string telno;
string citzn;
string nfather;
string occuf;
string nmother;
string occum;
string skill;
gotoxy (1,1);
cout <<
"========================================================================
=======";
gotoxy (28,2);
cout << "E-Legal Recruiter Inc.";
gotoxy (1,3);
cout <<
"========================================================================
=======";
gotoxy (6,4);
cout << "Given Name :";
gotoxy (32,4);
cout << "Surname:";
gotoxy (60,4);
cout << "M.I.:";
gotoxy (3,5);
cout << "Date of Birth :";
gotoxy (49,5);
cout << "Place of Birth :";
gotoxy (8,6);
cout << "Religion :";
gotoxy (60,6);
cout << "Age :";
gotoxy (4,7);
cout << "Civil Status :";
gotoxy (57,7);
cout << "Height :";
gotoxy (10,8);
cout << "Gender :";
gotoxy (57,8);
cout << "Weight :";
gotoxy (1,9);
cout << "Present Address :";
gotoxy (10,11);
21
27
Problem: Using C++, have a discount rate for each gender (M and F) symbolized by 1 and 0
respectively, and in relation with their age. If M/F age 7-13 20%, age 14-18 15%, and 19-22 5%.
If female age 23-30 5%, and more than 30 will get 5%. Find the Discount amount = Disc. Rate*
Age.
Output 1
Output 2
Code:
28
#include <iostream>
#include <windows.h>
using namespace std;
void gotoxy (int x, int y)
{
COORD coord;
coord.X = x;
coord.Y = y;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
}
int main ()
{
string Name, Address;
int Gender, Age;
float DiscountRate, DiscountAmt;
DiscountRate= 0;
Age=0;
gotoxy (1,18);
system ("pause");
return 0;
}
FINGrades-Duque
30
Problem: Using VB, compute for the Quiz Average, Class Standing, and Grade given the
quizzes, attendance, recitation, and exam of the user. Include the student number, name, and
course.
Form 1
Form 2
Codes:
Under Form 1
Private Sub btnclear_Click()
Me.txtsno.Text = ""
Me.txtsname.Text = ""
Me.txtcourse.Text = ""
Me.txtq1.Text = ""
Me.txtq2.Text = ""
Me.txtq3.Text = ""
Me.txtatt.Text = ""
Me.txtreci.Text = ""
Me.txtexam.Text = ""
End Sub
Private Sub btnprocessgrade_Click()
31
Form2.Show
Me.Hide
Dim varClassStanding As Single
Form2.txtsno.Text = Me.txtsno.Text
Form2.txtsname.Text = Me.txtsname.Text
Form2.txtcourse.Text = Me.txtcourse.Text
Form2.txtatt.Text = Me.txtatt.Text
Form2.txtreci.Text = Me.txtreci.Text
Form2.txtexam.Text = Me.txtexam.Text
Form2.txtqave.Text = ((Val(Me.txtq1.Text) + Val(Me.txtq2.Text) + Val(Me.txtq3.Text)) / 3)
varClassStanding = ((Val(Form2.txtqave.Text) + Val(Me.txtatt.Text) + Val(Me.txtreci.Text)) / 3)
Form2.txtgrade.Text = ((varClassStanding * 2 + Val(Me.txtexam.Text)) / 3)
Form2.txtcs.Text = varClassStanding
End Sub
Under Form 2
Private Sub btnback_Click()
Form1.txtsno.Text = ""
Form1.txtsname.Text = ""
Form1.txtcourse.Text = ""
Form1.txtq1.Text = ""
Form1.txtq2.Text = ""
Form1.txtq3.Text = ""
Form1.txtatt.Text = ""
Form1.txtreci.Text = ""
Form1.txtexam.Text = ""
Form1.Show
Me.Hide
End Sub
Private Sub btnexit_Click()
End
End Sub
FINExer1TwoForm
32
Problem: Create an input form for Student number, Program enrolled, and Student Name and
another form to show what you input in the previous form.
Form1
Form 2
Code:
Under Form 1
33
FINALS_SalesTran_Duque
34
Problem: Using VB, compute for the Gross Sale, Change Amt., and the item and its description
for D-Makabenta Corporation. If the quantity exceeds 100 but not over 200, provide 25%
discount and, 50% discount if more than 200.
Form 1
Form 2
Code:
Under Form 1
35
FINALS_Parking_DUQUE
37
Problem: Using VB, determine the change amt., Parking fee and the vehicle description given
the vehicle type and cash on hand for a Parking area.
Form 1
Form2
Code:
38
Under Form 1
Private Sub btnClear_Click()
Form1.txtCash.Text = ""
Form1.txtPlateno.Text = ""
Form1.txtVtype.Text = ""
End Sub
Private Sub btnSubmit_Click()
Form2.Show
Me.Hide
Dim vChange, vPfee As Single
Dim vDesc As String
vChange = 0#
vPfee = 0#
vDesc = "ERROR: Check Vehicle Code"
Me.txtVtype.Text = UCase(Me.txtVtype.Text)
If Me.txtVtype.Text = "AUV" Then
vPfee = "25.00"
vDesc = "Asian Utility Vehicle"
End If
If Me.txtVtype.Text = "PVT" Then
vPfee = "30.00"
vDesc = "Private Vehicle"
End If
If Me.txtVtype.Text = "PUB" Then
vPfee = "50.00"
vDesc = "Public Utlity Bus"
End If
If Me.txtVtype.Text = "PUJ" Then
vPfee = "40.00"
vDesc = "Public Utility Jeepney"
End If
If Me.txtVtype.Text = "MTR" Then
vPfee = "20.00"
vDesc = "Motorcycle"
End If
vChange = Val(Me.txtCash.Text) - vPfee
Form2.txtVtypeandDesc.Text = Me.txtVtype.Text
Form2.txtVdesc.Text = vDesc
Form2.txtPfee.Text = vPfee
Form2.txtChangeamt.Text = vChange
End Sub
39
Under Form 2
Private Sub btnExit_Click()
End
End Sub
Private Sub btnProcess_Click()
Form1.Show
Me.Hide
Form1.txtCash.Text = ""
Form1.txtPlateno.Text = ""
Form1.txtVtype.Text = ""
End Sub
40