0% found this document useful (0 votes)
27 views3 pages

Final Exam Summer 2020 Programming Fundamentales SEQs

The document outlines the final term exam for the Programming Fundamentals course at The University of Lahore, including instructions for candidates on how to submit their answers and the required format. It contains specific short essay questions related to programming tasks, such as developing an IoT system for disaster relief, designing a memory management program for laptops, and creating a software solution for employee salary calculations. Additionally, it includes a programming exercise to identify and correct errors in a provided code snippet.

Uploaded by

burhannajeeb8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Final Exam Summer 2020 Programming Fundamentales SEQs

The document outlines the final term exam for the Programming Fundamentals course at The University of Lahore, including instructions for candidates on how to submit their answers and the required format. It contains specific short essay questions related to programming tasks, such as developing an IoT system for disaster relief, designing a memory management program for laptops, and creating a software solution for employee salary calculations. Additionally, it includes a programming exercise to identify and correct errors in a provided code snippet.

Uploaded by

burhannajeeb8
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Continued from Overleaf 3

Total Pages

Mentor’s Signature

THE UNIVERSITY OF LAHORE


Faculty Name: Engineering and Technology
Department Name: Electrical Engineering
Summer Semester 2020
Final Term Exam
Short Essay Questions (SEQs)

Instructor’s Name: Omer Khan Paper: Programming Fundamentals

Date: 09 September 2020 Subject Code: CS02118

Time Allowed: 105 minutes Total Marks: 25

Instructions for Candidates


i. A4 size pages are to be used by students for the answering of long questions. White color
paper is mandatory though it can be blank or with lines.
ii. For submitting hand written answer, following file formats can be used and uploaded using
google drive:
1. Image File
2. Word Document
3. PDF File
4. Any Other Suitable Format
iii. Following fields must be shown on each page of answer sheets.
• Student Registration Number • Teacher Name
• Student Name • Page Number
• Course Title • Exam Date and Time
• Course Code and Section
iv. Students have to make sure they have the attachment papers ready with written credentials (as
mentioned in iii) beforehand.
v. Users can upload as many files as required using Access Control Link of Cloud Upload
(Google Drive).
vi. Students can use direct Camera Picture or preferable apps for it (Cam Scanner, Microsoft lens)
for better results and easier uploading.
vii. Each question must be answered and completed.
viii. Attempt all questions.
ix. Illustrate your answers with diagrams, graphs and tables if required.

Page 1 of 3
Please turn over
Continued from Overleaf

Question 02: (Marks: 08 | CLO 3 | PLO 6 | C5)

In 2020 Pakistan faced many natural disasters like COVID-19, floods and swarm attack of insects on
yields. To provide relief to affected government require a survey to Asses damages caused by these
disasters to determine suitable measures for current situation. You are hired to perform following task.
Evaluate current circumstances and provide reliable IOT based system that can be implemented to
provide aid to civilians in a secure manner. Defend your stance with the help of arguments as software
engineer.
Note: this is not a design problem provide your solutions and arguments in favor of your solution

Question 03: (Marks: 11 | CLO 1 | PLO 3 | C6)

By monitoring the response of customers, a laptop company realize that most of the users installed two
hard drives in their laptops. Solid State Drive (SSD) for their operating system and software and Hard
Disk Drive (HDD) for data storing. To manage data communication in both drives they require memory
management program.
As a programmer Design prototype system that contains following functions
Function Purpose
void SSD2HHD (); To copy data from SSD to HHD
void HHD2SSD (); To copy data from HHD to SSD
void insertSSD (); Insert data in SSD at provided location
void insertHHD(); Insert data in HHD at the start of memory
void deleteSSD(); Delete data at the start of SSD
void deleteHHD(); Delete data the provided location
void searchSSD(); To search data at provided location
void searchHHD(); To search data by value
Note: as a programmer you can pass arguments as a parameter to any of the function if required.

Question 04: (Marks: 06 | CLO 2 | PLO 1 | C3)


A software house is hired to design a software for a company with following requirements:
Create an array of the given structure ‘Emp’
struct Emp
{
int Emp_No;
char Emp_Name[15];
float Emp_Basic;
};
Create user defined functions to
a) Sort the array of structures declared in ascending order of Emp_Basic
b) Calculate the net salary of each employee using:
Net Salary = Basic + H.R.A.+ D.A. – P.F.
H.R.A. = 25 % of Basic
D.A = 10 % of Basic
P.F. = 10% of Basic

Page 2 of 3
Please turn over
Continued from Overleaf

As a programmer from a research center you are assigned to test beta version of software. Use your
programming knowledge to identify syntax and logical error of the program and Write its output
#include <iostream>
using namespace std;
struct Employee{
int Employee_No;
char Employee_Name[15];
float Employee_Basic;
}
void display (Employee E1[], int index)
void sort (Employee E1[], int index)
void Netsalary (Employee E1[], int index)
void main ();
display (E,Array_index);
sort (E,Array_index);
display (E,Array_index);
Netsalary (E,Array_index);
}
void display (Employee E1[], int index){
for (int i=0; i<index;i++)
{
cout<<endl<<" Employee No:"<<E1[i].Employee_No;
cout<<endl<<" Employee Name:";
puts(E1[i].Employee_Name);
cout<<" Employee Basic:"<<E1[i].Employee_Basic;
}
}
void sort (Employee E1[], int index){
struct Employee temp;
for (int i=0; i<index;i++);
for (int j=0; j<index-i+1;j++)
if (E1[j].Employee_Basic<E1[j+1].Employee_Basic) {
temp = E1[j+1];
E1[j]=E1[j+1];
E1[j+1]=temp;
}
cout<<"Sorting Complete";
}
void Netsalary (Employee E1[], int index){
cout<<"==================================="<<endl;
cout<<"Net Salaries for all employees"<<endl;
float Salary[50];
for ( int i=0; i<index;i++){
Salary[i]= (1.25) * E1[i].Employee_Basic;
cout<<"Employee No: "<<E1[i].Employee_No<<" Net Salary: "<<Salary[i]<<endl;
}
}

Page 3 of 3
Please turn over

You might also like