ALLInterview.com :: Home Page      
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   Errors
   Refer this Site  Refer This Site to Your Friends  Site Map  Contact Us      
   
 
 Categories >> Software >> Programming Languages >> C++ >> OOPS
 
Suggest New Category 
 


 

Question Asked @ Answers Views     Select
what is difference between class template and template class?    0  13
WAP to generate 2n+1 lines of the following pattern on the computer screen:    1  25
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.    0  19
What is this interview room ? Is it a class or an object. cybage   2  82
The type of variable a pointer points to must be the part of pointer's definition so that: infosys   1  60
OOP'S advantages of inheritance include: infosys   1  75
How to create a comment page in C #??    2  64
what is difference between thread and programme. ncc   0  48
can you give the dynamic polymorphism types? wipro   2  205
what is the new version of c++ ignou   1  178
what is the new version of oops ignou   0  106
write a C++ program for booking using constructor and destructor. hal   0  110
which is best institute to learn c,c++ in ameerpet hyderabad    0  133
Objective The objective of this problem is to test the understanding of Object-Oriented Programming (OOP) concepts, in particular, on encapsulation. Problem Description Create a program for managing customer’s bank accounts. A bank customer can do the following operations: 1. Create a new bank account with an initial balance. 2. Deposit money into his/her account. 3. Withdraw money from his/her account. For this operation, you need to output “Transaction successful” if the intended amount of money can be withdrawn, otherwise output “Transaction unsuccessful” and no money will be withdrawn from his/her account. Input The input contains several operations and is terminated by “0”. The operations will be “Create name amount”, “Deposit name amount”, or “Withdraw name amount”, where name is the customer’s name and amount is an integer indicating the amount of money. There will be at most 100 bank accounts and they are all created on the first month when the bank is opening. You may assume that all account holders have unique names and the names consist of only a single word. Output The output contains the transaction result of withdrawal operations and the final balance of all customers after some withdrawal and deposit operations (same order as the input). Sample Input Create Billy 2500 Create Charlie 1000 Create John 100 Withdraw Charlie 500 Deposit John 899 Withdraw Charlie 1000 0    0  175
c++ program to swap the objects of two different classes    0  158
E-Mail New Answers        Answer Selected Questions        Post New oops Questions
  Next
 
 
 
 
 
Un-Answered Questions
 
 Question Views   Select
 
can inline function declare in private part of class? 456
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory 924
What is byval and byref? What are differences between them? 176
What is nutshell in programming language? 2127
How to use CMutex, CSemaphore in VC++ MFC 1058
design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required) 2077
what is graphics 192
program for insertion ,deletion,sorting in double link list 465
#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort 176
how to find the correct email address format by using the programe? 438
#include <string.h> #include <stdio.h> #include <stdlib.h> #include <conio.h> void select(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); select(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void select(char *items, int count) { register int a, b, c; int exchange; char t; for(a = 0; a < count-1; ++a) { exchange = 0; c = a; t = items[ a ]; for(b = a + 1; b < count; ++b) { if(items[ b ] < t) { c = b; t = items[ b ]; exchange = 1; } } if(exchange) { items[ c ] = items[ a ]; items[ a ] = t; } } } design an algorithm for Selection Sort 172
Objective The objective of this problem is to test the understanding of Object-Oriented Programming (OOP) concepts, in particular, on encapsulation. Problem Description Create a program for managing customer’s bank accounts. A bank customer can do the following operations: 1. Create a new bank account with an initial balance. 2. Deposit money into his/her account. 3. Withdraw money from his/her account. For this operation, you need to output “Transaction successful” if the intended amount of money can be withdrawn, otherwise output “Transaction unsuccessful” and no money will be withdrawn from his/her account. Input The input contains several operations and is terminated by “0”. The operations will be “Create name amount”, “Deposit name amount”, or “Withdraw name amount”, where name is the customer’s name and amount is an integer indicating the amount of money. There will be at most 100 bank accounts and they are all created on the first month when the bank is opening. You may assume that all account holders have unique names and the names consist of only a single word. Output The output contains the transaction result of withdrawal operations and the final balance of all customers after some withdrawal and deposit operations (same order as the input). Sample Input Create Billy 2500 Create Charlie 1000 Create John 100 Withdraw Charlie 500 Deposit John 899 Withdraw Charlie 1000 0 175
Please send ford technologies placement paper 2 my mail id 292
Question In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Question Submitted By :: Sunil Kumar I also faced this Question!! Rank Answer Posted By Re: In a class, there is a reference or pointer of an object of another class embedded, and the memory is either allocated or assigned to the new object created for this class. In the constructor, parameters are passed to initialize the data members and the embedded object reference to get inialized. What measures or design change should be advised for proper destruction and avioding memory leaks, getting pointers dangling for the embedded object memory allocation? Please suggest. Answer # 1 use copy constructors 0 Shanthila There is something to be taken care in destructor, in copy constructor, suppose the memory is assigned to the embedded member object pointer with the parameter passed value, but if some other objects of different class also are pointing to this memory, then if some one deletes the object then this class member pointer object will become dangling, or if the object is not deleted properly then there will be memory leak. Please suggest the design change required to handle or avoid this situation 316
write a programe to calculate the simple intrest and compund intrest using by function overlading 245
E-Mail New Answers        Answer Selected Questions