0% found this document useful (0 votes)
0 views7 pages

Alonzo, Eunice Sp.(Bscpe 1-1)_final Examination

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 7

FINAL EXAMINATION – CMPE101

1st Semester, A.Y. 2023-2024


NAME: Eunice Sp. Alonzo PROFESSOR: Engr. Christopher F. Cunanan
COURSE, YEAR AND SECTION: BSCPE 1-1 DEADLINE: February 13, 2024 (11:59 PM)
I. IDENTIFICATION.
1. Data analytics. The science of analyzing raw data to make conclusions about
information.
2. Internet of Things (loT). Refers to the collective network of connected devices and the
technology that facilitates communication between devices and the cloud, as well as
between the devices themselves.
3. Human-computer interaction (HCI) is defined as the field of study that focuses on
optimizing how users and computers interact by designing interactive computer
interfaces that satisfy users’ needs.
4. Machine learning. A branch of artificial intelligence (AI) and computer science which
focuses on the use of data and algorithms to imitate the way that humans learn,
gradually improving its accuracy.
5. Artificial intelligence. The simulation of human intelligence processes by machines,
especially computer systems. Specific applications of AI include expert systems, natural
language processing, speech recognition and machine vision.
6. Embedded system. A combination of computer hardware and software designed for a
specific function.
7. Cloud computing. The delivery of computing services—including servers, storage,
databases, networking, software, analytics, and intelligence—over the internet (“the
cloud”) to offer faster innovation, flexible resources, and economies of scale.
8. Data mining. The process of sorting through large data sets to identify patterns and
relationships that can help solve business problems through data analysis. Data mining
techniques and tools enable enterprises to predict future trends and make more-
informed business decisions.
9. Blockchain. A shared, immutable ledger that facilitates the process of recording
transactions and tracking assets in a business network. An asset can be tangible (a
house, car, cash, land) or intangible (intellectual property, patents, copyrights,
branding).
10. Robotic Process Automation (RPA) is software technology that’s easy for anyone to use
to automate digital tasks. With RPA, software users create software robots, or “bots”,
that can learn, mimic, and then execute rules-based business processes.
11. Super app is a mobile or web application that combines multiple services into one
platform -- sometimes called multi-service tech platforms. The term super app has been
credited to Blackberry founder Mike Lazardis. Super apps have set of core features and
independent mini apps that users can access within them.
12. The C <math. t> header file declares a set of functions to perform mathematical
operations such as: sqrt() to calculate the square root, log() to find natural logarithm of
a number etc.
13. C. A general-purpose programming language created by Dennis Ritchie at the Bell
Laboratories in 1972. It is a very popular language, despite being old. The main reason
for its popularity is because it is a fundamental language in the field of computer
science. C is strongly associated with UNIX, as it was developed to write the UNIX
operating system.
14. In C programming, #define is a preprocessor directive that is used to define macros. The
macros are the identifiers defined by #define which are replaced by their value before
compilation. We can define constants and functions like macros using #define.
15. Low-level programming language. A programming language that provides little or no
abstraction from a computer’s instruction set architecture—commands or functions in
the language map that are structurally similar to processor’s instructions. Generally, this
refers to either machine code or assembly language.
16. A high-level programming language (HLL) stands as a highly abstracted language
designed to simplify computer programming. The abstraction level is such that it
obscures the details of the computer system, like memory management and hardware
addressing, making it easier for individuals to write and understand the code.
17. Database Management Systems (DBMS). These are software systems used to store,
retrieve, and run queries on data. A DBMS serves as an interface between an end-user
and a database, allowing users to create, read, update, and delete data in the database.
18. Object-oriented programming (OOP) is a style of programming characterized by the
identification of classes of objects closely linked with the methods (functions) with
which they are associated. It also includes ideas of inheritance of attributes and
methods.
19. Mobile application development is the process of creating software applications that
run on a mobile device, and a typical mobile application utilizes a network connection to
work with remote computing resources.
20. Web application development describes the process of designing, building, testing and
deploying web-based applications that will be installed on remote servers and delivered
to users or customers via the internet.
II. C++ PROGRAM COMPILATION
3 different source code (plus screenshot of output) of C++ programs assigned to the
class.
1. ATM PROGRAM IN C++
#include <iostream>
using namespace std;
#include <string>
int main() {
string creditcard,option;
int pincode, currency ;
cout<<"******************************Welcome to
BDO*********************************\n";
cout <<"\nEnter yes when done entering your credit card \n";
cin>>creditcard;
if (creditcard=="yes"||creditcard== "YES"||creditcard=="Yes"){
cout<<"\nInsert pin code: ";
cin>>pincode;
cout<<"\nInput action:\na. withdraw\nb. deposit\nc. check balance\nd. cancel\n: ";
cin>>option;

if (option=="a"){
cout<<"\nHow much? ";
cin>>currency;
cout<<"\nWithdrawing "<< currency << endl;
}else if (option=="b"){
cout<<"\nHow much?";
cin>>currency;
cout<<"\nDeposits "<<currency;
}else if (option=="c"){
cout<<"\nYour balance is 2000";
}else if (option=="d"){
cout<<"\nEND";
}
}
return 0;
}
2. BMI CALCULATOR
#include <iostream>
double calculateBMI(double weight, double height) {
return weight / (height * height); }
int main() {
double weight, height;
std::cout << "Enter weight in kilograms: ";
std::cin >> weight;
std::cout << "Enter height in meters: ";
std::cin >> height;
double bmi = calculateBMI(weight, height);
std::cout << "BMI: " << bmi << std::endl;
return 0;
}
}
3. DICE GAME
#include <iostream>
#include <cstdlib>
#include <ctime>
#include <thread>
#include <chrono>
int main() {
srand(time(0));
char playAgain;
do {
std::cout << "****************************************\n";
std::cout << "**********Welcome to the Game!**********\n";
std::cout << "****************************************\n\n";
std::cout << "Enter your name: ";
std::string pangalanmu;
std::cin >> pangalanmu;
std::cout << "\n****************************************\n";
std::cout << "*************Hello, " << pangalanmu << "!**************\n";
std::cout << "****************************************\n";
int lives = 3;
int score = 0;
do {
int guess1, guess2;
int dice1 = rand() % 6 + 1;
std::cout << "\nEnter two guess numbers on the dice (separated by space): ";
std::cin >> guess1 >> guess2;
std::cout << "Rolling";
for (int i = 0; i < 3; ++i) {
std::this_thread::sleep_for(std::chrono::milliseconds(500));
std::cout << ".";
std::cout.flush();
}
std::cout << "\n";
if (guess1 == dice1 || guess2 == dice1) {
std::cout << "\nCongratulations! You guessed correctly!\nThe dice showed: "<<
dice1 << "\n";
score++;
}else {
std::cout << "\nIncorrect guess. \nThe dice showed: " << dice1 <<" "<< "\n";
lives--;
if (lives > 0) {
std::cout << "\nYou have " << lives << " lives remaining.\n";
} else {
std::cout << "\nGame over. \nYour final score is: " << score << "\n";}
}
} while (lives > 0);
std::cout << "\nDo you want to try again? (y/n): ";
std::cin >> playAgain;
} while (playAgain == 'y' || playAgain == 'Y');
std::cout << "I hope you enjoy the dice game.\n";
return 0;
}

You might also like