Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Suppose we have the following declarations, which compile error-free.
C1 obj1 = new C1();
C2 obj2 = new C2();
Which of the following are valid? Check all that apply.
options: a) I1 x = obj1; b) I2 x = obj1; c) I1 x = obj2; d) I2 x = obj2;
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- You are said to store data of Hospitals in a city. For that purpose, you are asked to develop a structure of maxHeap using these structures in c++. You have to submit Hospital. h file only class Hospital { string HospitalName;string Address;string HospitalID;public:Hospital(); Hospital(string ,string ,string); Hospital(string HospitalID); // conversion Constructor string getHospitalName()const; string getHospitalId()const; string getAddress()const; void setHospitalName(string); void setHospitalId(string);void setAddress(string); // Relational operators with respect to Hospital Idbool operator<(Hospital)const;bool operator<=(Hospital)const;bool operator>(Hospital)const; bool operator>=(Hospital)const; bool operator==(Hospital)const;bool operator!=(Hospital)const; // output stream operatorfriend ostream& operator<<(ostream&, const Hospital& ref); s}; ostream& operator<<(ostream&, const Hospital& ref); class MaxHeap { public:class Node…arrow_forwardCorrect the following code fragment and what will be the final results of the variable a and b: class A { protected int x1,y1,z; public: A(a, b,c):x1(a+2),y1 (b-1),z(c+2) { for(i=0; i<5;i++) x1++; y1++;z++;}}; class B {protected: int x,y; public: B(a,b):x(a+1),y(b+2) { for(i=0; i<5;i++) x+=2; y+=1;}}; class D:public B, virtual public A { private: int a,b; public: D(k,m,n): a(k+n), B(k,m),b(n+2),A(k,m,n) { a=a+1;b=b+1;}}; int main() {D ob(4,2,5);}arrow_forwardHello, I'm working on this hangman simulation in C++. The code runs but it doesn't count wrong guesses after one letter is guessed correctly. Also, the body of the hangman comes out wrong. Could you help? #include<iostream>#include<cstring> // for string class functions#include<fstream>#include <cctype>using namespace std; int main(){ // define variable to get the response from user "Yes" or "No" string response; // Define index variable int w = 0; // define number of words that need to be guessed by the user assume 4 const int WORDS = 4; // loop do { // we will define the hangman body const char body[] = "o/|\\|\\"; // here we define the words string words[WORDS] = {"MACAW", "SADDLE", "TOASTER", "XENOICIDE"}; // fetch size or length string xword(words[w].length(),'*'); // define iterator to fetch the words string::iterator ix = xword.begin(); string::iterator i…arrow_forward
- In c++ ,Write a program which has a class called Character having a character data member. Overload the operator +, - and !. The overloaded+operator should be responsible for adding the ASCII values of two objects of this class, - operator should subtract the ASCII values of two objects and should return true in case two characters are unequal otherwise it should return false. You should make use of constructor to get input from the user.arrow_forwardModify the given c++ programarrow_forwardNeed help in this question in relation to Binding Timearrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education