Consider the class Students declaration and its constructor has two arguments (the data type of the first argument is String and that of the second argument is Integer). Which of the following statements correctly compiles? A. New Students john = Students (*John", 16); B. Students john(“John", 16); C. Students john = new Students (*John", 16); D. Students john = new Students (16, "john");

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 6PE
icon
Related questions
Question

please answer question 7 quickly thanks !

7. Consider the class Students declaration and its constructor has two
arguments (the data type of the first argument is String and that of the
second argument is Integer). Which of the following statements correctly
compiles?
A. New Students john = Students (*“John", 16);
B. Students john(“John", 16);
C. Students john = new Students (“John", 16);
D. Students john = new Students (16, "john");
%3D
Transcribed Image Text:7. Consider the class Students declaration and its constructor has two arguments (the data type of the first argument is String and that of the second argument is Integer). Which of the following statements correctly compiles? A. New Students john = Students (*“John", 16); B. Students john(“John", 16); C. Students john = new Students (“John", 16); D. Students john = new Students (16, "john"); %3D
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Developing computer interface
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,