Instructions Please read the following instructions carefully before submitting assignment: It should be clear that your assignment will not get any credit if: § The assignment is submitted after due date. § The submitted assignment does not open or file is corrupt. § All types of plagiarism are strictly prohibited. Note: You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted. If you will submit code in .doc (Word document) you will get zero marks. Objective The objective of this assignment is to provide hands on experience of using § Basic concepts of C++ language and Programming § Conditional statements of C language § Arrays in c language § Char manipulation in c++ § Sorting in c++ § Merging arrays Guidelines § Code should be properly aligned and well commented. § Follow c/c++ rules while writing variables names, function names etc § Use only dev-C++ for this assignment. § Use appropriate c/c++ structure i.e. loop, if-else, switch statement etc to get inputs from user (Marks will be deducted if inappropriate structure will be used). | |
Assignment | |
Problem Statement: Merging and Sorting of character arrays You are required to write a program that takes character values in two different arrays as input from user. After getting input, make a third array and merge both these array in third array. Output array must be sorted in ascending order. Detailed Description: 1. Declare three character type arrays. 2. Use two arrays to take input from user. o Take input as char type. o Take 10 values in each array. 3. Merge both these input arrays. o If an input character is in both arrays, then it should appear once in resulted array. 4. Store result in third array. 5. Sort resulted array in ascending order. o Ascending order means string values starting from ‘a’ will come first, and then starting from ‘b’ and so on. 6. Display them after sorting Sample Output Enter values in first array: a h b c u v I j k e Enter values in Second array: y u d f g k I w q a Merged array: a y h u b d c f g v k I j w q e Sorted Array in ascending order: a b c d e f g h I j k q u v w y | |
Deadline Your assignment must be uploaded/submitted on or before November 16, 2009 |
Let U = set of positive integers less or equal to 30, and A, B be the subsets of U where
A = positive odd integers less than 20,
B = Positive integers divisible by 3.
Find AÇB and AÈBc.
Let A = {1,2,3,4,5}, B ={ 6,7,8} define relations R and S as follows
R ={ for all (x,y) AB, xRy iff y – x 4}.
S ={ for all (x,y) AB, xSy iff y / x} .
Find RS and RcSc.
// data member for account holder’s name
1: Account_Holder
//data member for amount in the account
2: Amount
Your Program should define three constructors for the class Account
1: a constructor with no parameter
2: a constructor with two parameters (Account_Holder, Amount)
3: a copy constructor
All of these three constructors are meant to initialize their respective objects. Incase of copy constructor, you are required to assign a separate space for the data members of the new object while copying the values of previously existed object.
Declare three objects (1 for each type of constructor) in main.
Write a function in class Account to display the initialized data members for each object.
Also write destructor for the class Account. Display a message that says “destructor called” in the destructor body.
Note: you can do better by making your variable names more meaningful. Adding proper comments and indenting your code properly.
OUTPUT
Your output should be similar to the following
Ahsan
15000
_________________
Umar
70000
_________________
Qasim
19000
************************************
I have googled and worked a lil bit , below is my code snippet but it gives error . Prompt help will be highly appreciated.
"# include
class Account
{
protected:
char* Account_Holder;
int Amount;
public:
Account();
Account( char* Holder, int Num );
Account( const Account& );
};
Account::Account()
{
Account_Holder = NULL;
Amount = 0;
}
Account::Account( char* Holder, int Num )
{
Account_Holder = Holder;
Amount = Num;
}
Account::Account( const Account& )
{
Account_Holder = obj.Account_Holder;
Amount = obj.Amount;
}
}; //end of fn
Question # 1 of 10 ( Start time: 09:51:48 PM ) Total Marks: 1
Individual cultural variables include:
Select correct option:
chronemics, proxemics
space zone, oral communication
adopters and duplicators
verbal and written communication
Question # 2 of 10 ( Start time: 09:53:11 PM ) Total Marks: 1
Conclusions made by reasoning are called:
Select correct option:
References
Inferences
Repercussions
Preferences
Question # 3 of 10 ( Start time: 09:54:31 PM ) Total Marks: 1
Communication from vice president to district sales manager is called:
Select correct option:
Horizontal
Upward
Downward
Circular
Question # 4 of 10 ( Start time: 09:55:09 PM ) Total Marks: 1
We make feedback more useful by:
Select correct option:
Planning how and when to accept it.
Being receptive to our audience’s responses.
Encouraging frankness and using feedback to improve communication.
All of the above
Question # 5 of 10 ( Start time: 09:56:39 PM ) Total Marks: 1
Personal space varies according to:
Select correct option:
Situation
Culture, status
Medium
Channel
Question # 6 of 10 ( Start time: 09:57:42 PM ) Total Marks: 1
Artifacts are objects used to convey-------------messages
Select correct option:
Verbal
Non-verbal
Written
Oral and written
Question # 8 of 10 ( Start time: 09:59:51 PM ) Total Marks: 1
In----------- characteristics such as body shape, body odors, and weight hair and skin color are included.
Select correct option:
mental
physical
spiritual
verbal
Question # 9 of 10 ( Start time: 10:00:15 PM ) Total Marks: 1
Which thing is the most important to be promoted for the higher job?
Select correct option:
Good personality
Patience
Knowledge of the cultural conventions of your office.
Good communication skills
Question # 10 of 10 ( Start time: 10:00:35 PM ) Total Marks: 1
Communication from sales representative to the manager shows which type of communication?
Select correct option:
Horizontal
Upward
Downward
Circular
Question # 1 of 10 ( Start time: 10:12:27 PM ) Total Marks: 1
Theories of communication have made the concept of communication:
Select correct option:
Vague
Clear
Unpractical
Conditional
Question # 2 of 10 ( Start time: 10:13:33 PM ) Total Marks: 1
Good Communicators have common qualities like:
Select correct option:
Perception and Precision
Credibility and Control
Congeniality
All
Question # 3 of 10 ( Start time: 10:14:58 PM ) Total Marks: 1
--------- is a more formal way of communication.
Select correct option:
Written communication
Oral communication
Non-verbal
Distance communication
Question # 4 of 10 ( Start time: 10:15:46 PM ) Total Marks: 1
Conclusions made by reasoning are called:
Select correct option:
References
Inferences
Repercussions
Preferences
Question # 5 of 10 ( Start time: 10:16:41 PM ) Total Marks: 1
Clarity is achieved in part through a balance between ……………………………….
Select correct option:
Precise and familiar language
Complex and difficult language
Easy and simple language
Rough and tough language
Question # 6 of 10 ( Start time: 10:17:45 PM ) Total Marks: 1
Artifacts are objects used to convey-------------messages
Select correct option:
Verbal
Non-verbal
Written
Oral and written
Question # 8 of 10 ( Start time: 10:18:29 PM ) Total Marks: 1
A formal style is characterized by more------------ sentences.
Select correct option:
Simple
Complex
Easy
Short
Question # 9 of 10 ( Start time: 10:19:09 PM ) Total Marks: 1
- --------------- is the main idea that you wish to communicate.
Select correct option:
Message
Medium
Context
Feedback
During the careful creation of message; we focus on:
Select correct option:
Sender
Channel
Receiver
Response
In----------- characteristics such as body shape, body odors, and weight hair and skin color are included.
Select correct option:
mental
physical
spiritual
verbal
if your message is specific, definite and vivid; you are applying which of the following principle:
Select correct option:
Conciseness
Concreteness
Completeness
Consideration
Advancement in technology has brought changes in the business market. Which one is not correct from the following:
Select correct option:
increased demand of things.
made communication easy.
increased market competition.
ignored local markets.
Artifacts are objects used to convey-------------messages
Select correct option:
Verbal
Non-verbal
Written
Oral and written
We make feedback more useful by:
Select correct option:
Planning how and when to accept it.
Being receptive to our audience’s responses.
Encouraging frankness and using feedback to improve communication.
All of the above
Using ‘stoled’, instead of stolen is --------------- expression.
Select correct option:
Substandard
Appropriate
Good
Standard
The good communicators ‘maintain’ during the Congeniality:
Select correct option:
They maintain friendly, pleasant relations with you.
Good communicators command your respond and goodwill.
You are willing to work with them again, despite their differences.
All the above
Each person’s mental filter is different and perception of reality varies from person to person, it can cause --------------- barriers.
Select correct option:
psychological
physical
semantic
semiotic
----------------- means to express yourself in fewest possible words.
Select correct option:
Conciseness
Completeness
Correctness
Clarity
regards
ENG201 (Business & Technical English)
Q1: You have received an appointment letter as a software engineer from XYZ software house. Write a letter of acceptance stating your joining date and agreement on terms and conditions of the contract.
Dear _____________,
I was pleased to receive your offer of the position of [Insert Position Here] at [Insert Company Here]. Your offer is quite fair, based on the position’s responsibilities and my qualifications. Please record this letter as my official acceptance of the position.
Your confidence in my ability to perform the duties required will be rewarded. The experience and judgment I have gained over the past years will enable me to perform these duties successfully and satisfactorily.
I look forward to working with you in the near future.
Sincerely,
Q2: Choose the correct answer. 5
1. I'll ______________ their cat while they are away on holiday.
(a) be looking into
(b) be looking at
(c) be looking after correct
(d) be looking over
2. By the time she arrives, we ________________ our homework.
(a) finish
(b) will have finished correct
(c) will finish
(d) were finished
3. If she ___________ about his financial situation, she would have helped him out.
(a) knew correct
(b) had been knowing
(c) had known
(d) have known
4. I'm afraid I can't understand you
(a) if you speak unclear.
(b) unless you speak more clearly. correct
(c) if you don't speak clear.
(d) if you speak clearly.
5. She _________________ lunch by the time we arrived.
(a) had finished correct
(b) finished
(c) have finished
(d) finishing
ENG201 (Business & Technical English)
Muzammal swswa_26@yahoo.com
Q1: You have received an appointment letter as a software engineer from XYZ software house. Write a letter of acceptance stating your joining date and agreement on terms and conditions of the contract.
Dear _____________,
I was pleased to receive your offer of the position of [Insert Position Here] at [Insert Company Here]. Your offer is quite fair, based on the position’s responsibilities and my qualifications. Please record this letter as my official acceptance of the position.
Your confidence in my ability to perform the duties required will be rewarded. The experience and judgment I have gained over the past years will enable me to perform these duties successfully and satisfactorily.
I look forward to working with you in the near future.
Sincerely,
Q2: Choose the correct answer. 5
1. I'll ______________ their cat while they are away on holiday.
(a) be looking into
(b) be looking at
(c) be looking after correct
(d) be looking over
2. By the time she arrives, we ________________ our homework.
(a) finish
(b) will have finished correct
(c) will finish
(d) were finished
3. If she ___________ about his financial situation, she would have helped him out.
(a) knew correct
(b) had been knowing
(c) had known
(d) have known
4. I'm afraid I can't understand you
(a) if you speak unclear.
(b) unless you speak more clearly. correct
(c) if you don't speak clear.
(d) if you speak clearly.
5. She _________________ lunch by the time we arrived.
(a) had finished correct
(b) finished
(c) have finished
(d) finishing