Question

D Question 6 4 pts Figure 1: clock Type |-hr: int -min: int -sec; int setTime (int, int, int): void get Time (inte, int&, int
D Question 4 4 pts Consider the following class definitions: class class public: void setx cinta): // Postcondition: x = a; v
Question 3 4 pts C++ provides __functions as a means to implement polymorphism in an inheritance hierarchy, which allows the
Attem 59 M Question 1 4 pts Consider the following class definition: class dclass: bclass //class members list 1: The class c
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Question 6)

Answer) three

=============================

Question 7)

Answer) (first option)

void dClass::setXY(int a,int b)

{

bClass::setX(a);

y=b;

}

===================================

Question3 :

Answer) virtual

===================================

Question 1)

Answer) private

==================================Thank You

Add a comment
Know the answer?
Add Answer to:
D Question 6 4 pts Figure 1: clock Type |-hr: int -min: int -sec; int setTime...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Cloekt Cloek ( int, int, int) etTire(int, int, intjt void getHour printTime voia int int teqran...

    Cloekt Cloek ( int, int, int) etTire(int, int, intjt void getHour printTime voia int int teqran le (Clock)boolean 46. According to the UML class diagram above, which of the following is a. ClockO _ data member c. min d. Clock b. According to the UML class diagram above, which method is pablic and doesn't return anything? a getCopyO b. setTime(int, int, int) which ofthe following would be a default constructor ior he ein. Click does is te ips bro a....

  • Question 1 10 pts Inheritance is a capability of C++ to represent increased specialization that is...

    Question 1 10 pts Inheritance is a capability of C++ to represent increased specialization that is often found in real world relationships. True False Question 2 10 pts Inheritance between a child and parent object exhibits an 'relationship. Question 3 10 pts As you move down an inheritance relationship from parent to child, you typically move from a general to specific description. True False Question 4 10 pts The syntax for declaring DerivedClass to publicly inherit from BaseClass is given...

  • Question 28 public class Main public static void main(String args[]) { Iparentp=new Child (1.2); p.printo: interface...

    Question 28 public class Main public static void main(String args[]) { Iparentp=new Child (1.2); p.printo: interface Iparent public int x = 1; public void printo: class Child implements Iparent private int y public Child(int a, int b) y b: public void printot System.out.print("Child"-yl: Child 2 public int x = 1; public void print(); class Child implements Iparent! private int y public Child(int a, in lb) y=b; public vold print! System.out.pnt("Child"+y): Child 2 1 None of the above • Previous

  • 4.a) 4.b> 4.c) C++ Programming Lab Exercise 09 Inheritance. Friend Functions, and Polymorphism (virtual functions) 4.a)...

    4.a) 4.b> 4.c) C++ Programming Lab Exercise 09 Inheritance. Friend Functions, and Polymorphism (virtual functions) 4.a) Run the following code and observe the output. #include <iostream> #include <string> using namespace std; class Vehicle public: void print() { cout << "Print: I am a vehicle. \n"; } void display() { cout << "Display: I am a vehicle. \n"; } }; class Car: public Vehicle { public: void print() { cout << "Print: I am a car.\n"; } void display() { cout...

  • 7 Question 27 4 pts What is displayed by this program? #include <stdio.h> void seven(int *xPtr);...

    7 Question 27 4 pts What is displayed by this program? #include <stdio.h> void seven(int *xPtr); int main(void) int x,y: X-5: y = 6: seven(&x): seven(&y): printf("%4d%4d\n", x,y); return(0); void seven(int "xPtr) inty: y -'xPtr+2; *xPtry3; (Show blank spaces with asterisks)

  • C++ Practice: Answer Whichever you can & it'll help a lot. Thank you! Question 1. Implement...

    C++ Practice: Answer Whichever you can & it'll help a lot. Thank you! Question 1. Implement the constructors and member function of each of the classes (Marks 15) class Fraction{ private: int numerator; int denominator; public: Fraction(int, int); float fractionValue();//determines the value of numerator/denominator }; class Problem{ private: Fraction f[3]; public: Problem(int, int, int, int, int, int); Fraction largestFraction();//Returns the fraction having largest fraction value }; Question 2: In the following Inheritance problem #include<iostream> #include<string> using namespace std; class Animal{...

  • Question 19 Given the following class: public class Swapper ( private int x; private String y...

    Question 19 Given the following class: public class Swapper ( private int x; private String y public int z; public Swapper( int a, String b, int c) ( x-a; y b; zC; public String swap() ( int temp -x; x-z z temp; return y: public String tostring() ( if (x<z) return y: else return" +x+z What would the following code output? Swapper r new Suapper( 5, "no", 10); System.out.printin( r. swap ) ): no no510 510 e 15 Question 20...

  • The rest of question 4: object. Make sure that the implementation of class Employee2 includes all...

    The rest of question 4: object. Make sure that the implementation of class Employee2 includes all necessary revisions to all members functions that appeared in class Employee implementation. Heres a link for the class Employee: http://www.cs117.ghriga.com/blog/2017/10/07/practice-4/ de the program and determine its output if the user enters-2 B) Trace the program and determine its output if the u C) Trace the program and determine its output if the ts D) Trace the program and determine its output if the user...

  • (a) Consider the following C++ function: 1 int g(int n) { 2 if (n == 0)...

    (a) Consider the following C++ function: 1 int g(int n) { 2 if (n == 0) return 0; 3 return (n-1 + g(n-1)); 4} (b) Consider the following C++ function: 1 bool Function (const vector <int >& a) { 2 for (int i = 0; i < a. size ()-1; i ++) { 3 for (int j = i +1; j < a. size (); j ++) { 4 if (a[i] == a[j]) return false; 5 6 } 7 return...

  • Please answer all the questions thank you 1) (Classes – 20 Points) Consider the following class...

    Please answer all the questions thank you 1) (Classes – 20 Points) Consider the following class declaration for Time to complete the questions below: DO NOT WRITE MORE THAN ASKED FOR. class Time private: int hours; int minutes; public: Time(); Time (int , int m = 0); void addMin(int m); void addHr(int h); void reset(int h = 0, int m = 0); Time operator+(const Time & t) const; Time operator-(const Time & t) const; Time operator*(double n) const; friend Time...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT