Skip to content
  • 0 Votes
    7 Posts
    3k Views
    zareenZ
    Ideas Solution 2: #include<iostream> #include<fstream> #include<stdio.h> using namespace std; class Employee{ private: int code; char name[20]; float salary; public: void read(); void display(); int getEmpCode() { return code;} int getSalary() { return salary;} void updateSalary(float s) { salary=s;} }; void Employee::read(){ cout<<"Enter employee code: "; cin>>code; cout<<"Enter name: "; cin.ignore(1); cin.getline(name,20); cout<<"Enter salary: "; cin>>salary; } void Employee::display() { cout<<code<<" "<<name<<"\t"<<salary<<endl; } fstream file; void deleteExistingFile(){ remove("EMPLOYEE.DAT"); } void appendToFille(){ Employee x; x.read(); file.open("EMPLOYEE.DAT",ios::binary|ios::app); if(!file){ cout<<"ERROR IN CREATING FILE\n"; return; } file.write((char*)&x,sizeof(x)); file.close(); cout<<"Record added sucessfully.\n"; } void displayAll(){ Employee x; file.open("EMPLOYEE.DAT",ios::binary|ios::in); if(!file){ cout<<"ERROR IN OPENING FILE \n"; return; } while(file){ if(file.read((char*)&x,sizeof(x))) if(x.getSalary()>=10000 && x.getSalary()<=20000) x.display(); } file.close(); } void searchForRecord(){ Employee x; int c; int isFound=0; cout<<"Enter employee code: "; cin>>c; file.open("EMPLOYEE.DAT",ios::binary|ios::in); if(!file){ cout<<"ERROR IN OPENING FILE \n"; return; } while(file){ if(file.read((char*)&x,sizeof(x))){ if(x.getEmpCode()==c){ cout<<"RECORD FOUND\n"; x.display(); isFound=1; break; } } } if(isFound==0){ cout<<"Record not found!!!\n"; } file.close(); } void increaseSalary(){ Employee x; int c; int isFound=0; float sal; cout<<"enter employee code \n"; cin>>c; file.open("EMPLOYEE.DAT",ios::binary|ios::in); if(!file){ cout<<"ERROR IN OPENING FILE \n"; return; } while(file){ if(file.read((char*)&x,sizeof(x))){ if(x.getEmpCode()==c){ cout<<"Salary hike? "; cin>>sal; x.updateSalary(x.getSalary()+sal); isFound=1; break; } } } if(isFound==0){ cout<<"Record not found!!!\n"; } file.close(); cout<<"Salary updated successfully."<<endl; } void insertRecord(){ Employee x; Employee newEmp; newEmp.read(); fstream fin; file.open("EMPLOYEE.DAT",ios::binary|ios::in); fin.open("TEMP.DAT",ios::binary|ios::out); if(!file){ cout<<"Error in opening EMPLOYEE.DAT file!!!\n"; return; } if(!fin){ cout<<"Error in opening TEMP.DAT file!!!\n"; return; } while(file){ if(file.read((char*)&x,sizeof(x))){ if(x.getEmpCode()>newEmp.getEmpCode()){ fin.write((char*)&newEmp, sizeof(newEmp)); } fin.write((char*)&x, sizeof(x)); } } fin.close(); file.close(); rename("TEMP.DAT","EMPLOYEE.DAT"); remove("TEMP.DAT"); cout<<"Record inserted successfully."<<endl; } int main() { char ch; deleteExistingFile(); do{ int n; cout<<"ENTER CHOICE\n"<<"1.ADD AN EMPLOYEE\n"<<"2.DISPLAY\n"<<"3.SEARCH\n"<<"4.INCREASE SALARY\n"<<"5.INSERT RECORD\n"; cout<<"Make a choice: "; cin>>n; switch(n){ case 1: appendToFille(); break; case 2 : displayAll(); break; case 3: searchForRecord(); break; case 4: increaseSalary(); break; case 5: insertRecord(); break; default : cout<<"Invalid Choice\n"; } cout<<"Do you want to continue ? : "; cin>>ch; }while(ch=='Y'||ch=='y'); return 0; }
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    2 Posts
    427 Views
    zareenZ
    BIF401_Assignmnet_02_Solution_Fall_2019.pdf
  • 0 Votes
    1 Posts
    369 Views
    No one has replied
  • 0 Votes
    2 Posts
    372 Views
    zareenZ
    Solution: Paragraph no. 1 is bias-free. Paragraph no. 2 has age bias. Paragraph no. 3 has disability bias. Paragraph no. 4 is bias-free. Paragraph no. 5 has gender bias. Q2. People in the world are not exactly alike. Cultures or countries are not the same. These differences, however, can cause problems in conveying your meanings. Each person’s mind is different from others. As a result, message sender’s meanings and the receiver’s response are affected by many factors. Keeping this in mind read the given descriptions and identify the correct type of barrier from the given choices. (5*2=10 Marks) The meaning of words, signs and symbols might be different from one person to another and the same word might have hundreds of meanings. So, when a message is sent by a sender to a receiver, it might be interpreted wrongly in a communication process causing misunderstandings between them. Semantic barrier Psychological barrier Emotional barrier Perception barrier This is the type of barrier in which environmental and natural conditions act as a hindrance in communication in sending message from sender to receiver. Organizational environment and interior workspace design problems, technological problems and noise are the parts of these barriers. Attitude barrier Emotional barrier Physical barrier Perception barrier The influence of mental state of the communicators creates an obstacle for effective communication. Communication is highly influenced by the mental condition that the communicators are in and is disturbed by mental disturbance. If the people involved in communication are not emotionally well, they won’t be able to communicate properly. Psychological barrier Emotional barrier Attitude barrier Perception barrier These types of barriers are mental walls that keep you away from openly communicating your thoughts and feelings to others. They prevent you from being yourself and living your life to the fullest. Individuals with such barriers tend to be extremely reserved, cautious, and insecure. Emotional barrier Psychological barrier Attitude barrier Perception barrier One of the most obvious barriers in communication would be the ethnic, religious and social differences that may exist in trying to communicate. If one doesn’t know much about a person’s society with whom one is trying to communicate, it will create a barrier because one does not know how to start or end a conversation. Perception barrier Cultural barrier Attitude barrier Experiential barrier
  • 0 Votes
    1 Posts
    367 Views
    No one has replied
  • 0 Votes
    3 Posts
    1k Views
    zareenZ
    Absolute communication: is the segregation to communicate with everyone that has the same freedom as you. Some Like in all social media platform eg: Facebook, Whats app, Skype, Instagram and others we can communicate with everyone this is absolute communication. Absolute isolation: is the segregation from all of civilization being along with just yourself. Isolation would make people think about themselves and meaning of their life. Person could experience allocations because of loneliness.
  • 0 Votes
    7 Posts
    3k Views
    zareenZ
    Q.1 Answer [image: 75vrAb3.png] Q.2 Answer [image: 1S6Tme3.png]
  • 0 Votes
    3 Posts
    1k Views
    zareenZ
    [image: kg1w2Lc.png] [image: mByQmIk.png] [image: dmVJuL0.png] [image: gPRDepN.png] [image: qUrE1xH.png] [image: ZRBoWnh.png]
  • 0 Votes
    1 Posts
    390 Views
    No one has replied
  • 0 Votes
    2 Posts
    2k Views
    zareenZ
    Islamic Studies (ISL201) Solution: Taqwa is known as fear, clinging to obedience to Allah and abandoning disobedience to Him. It success in this life and the Hereafter. So we can say that it is the source of outstanding betterment. Following points describe clearly that Taqwa is the sum of all good. Persistence and steadfastness for right pathway Taqwa is a wonderful good thing that itself gives an entrance way to other good things. It is a source to stay on the right pathway and graciousness. Allah says: [center][image: 08Uwn9k.png][/center] “ verily, this is My Straight Path, so follow it, and follow not other paths, for they will separate you away from His Path. This He has instructed for you, that you may become al-muttaqoon.” Criterion to differentiate between wrong and right Taqwa means a lot more than just righteousness. It is source of knowing the difference between right and wrong and forgiveness from sins. [center][image: XZ9oTDp.png][/center] “O ye who believe! If ye fear Allah, He will grant you a criterion (to judge between right and wrong), remove from you (all) evil (that may afflict) you, and forgive you: for Allah is the Lord of grace unbounded.” Cause to remove sins If anyone has taqwa, Allah will not only remove his sins and evils but also increase his reward. Allah says in the Holy Quran: [center][image: FBFjWDA.png][/center] “If anyone fears Allah He will remove his ills and enlarge his reward.” Ease in matters Whoever has Taqwa, Allah makes his matters easy in this world and the hereafter. Allah says: [center][image: nf2dWBo.png][/center] “And whosoever fears Allâh and keeps his duty to Him, He will make his matter easy for him.” It does not mean that a Muttaqi will not face any problem, but due to the blessings of his Taqwa, he is assured easiness and the strength to face these complications without losing belief and hope by Allah. Allah loves to Muttaqeens Allah loves those who have taqwa and perform righteous deeds, so Taqwa is the source of gaining Allah’s love and blessings as well. Allah Almighty says: [image: fTXyl1z.png] “Truly Allah loves the Muttaqin.” [image: ZyGH5uy.png] “None can be its guardian except Al-Muttaqûn.” Source of Success Taqwa is a source to become successful. Anyone who wants to get succeed in this life and the hereafter has to do righteous deeds for the pleasure of Almighty Allah. Taqwa is also to do righteous deeds for fear of Allah Almighty. Allah says: [image: V5h9f4c.png] “And whosoever fears Allah and keeps his duty (to Him), such are the successful.” [image: W8GMqP0.png] “Have taqwa of Allah in order that you might succeed.” Base for cooperation Taqwa grows cooperation and love with one another. Allah says: [image: XimBV0b.png] “Help you one another in Al-Birr and At-Taqwa (virtue, righteousness and piety); but do not help one another in sin and transgression. And fear Allâh. Verily, Allâh is Severe in punishment.”
  • 0 Votes
    3 Posts
    408 Views
    mehwishM
    Solution link idea
  • 0 Votes
    2 Posts
    524 Views
    Maryam ZainM
    solution hai ksi ky pas gsc201 assignment ka ??
  • 0 Votes
    1 Posts
    195 Views
    No one has replied
  • 0 Votes
    1 Posts
    150 Views
    No one has replied
  • 0 Votes
    1 Posts
    182 Views
    No one has replied
Reputation Earning
How to Build a $1,000/Month World CUP LIVE Matches Live Cricket Streaming
Ads
File Sharing
Stats

0

Online

3.0k

Users

2.8k

Topics

8.6k

Posts
Popular Tags
Online User
| |