Final Exam Summer 2020 Programming Fundamentales SEQs
Final Exam Summer 2020 Programming Fundamentales SEQs
Total Pages
Mentor’s Signature
Page 1 of 3
Please turn over
Continued from Overleaf
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
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.
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