Join Telegram Channel for DXC exam Discussion & help!

Consider the following: Class rocket

Computer Programming MCQ Questions with Solutions

Choose the correct answer. A pseudo-code which is similar to that of c++ and self-explanatory. An accessible member function or data member for an object are accessed by the statement object name, function name or object name data member name respectively.

What can we infer from this code?

Class rocket
{
Private:
 integer height,weight
 public: //statement 1
 function input(int a,int b)
 {
height=a;
weight=b;
 }
}
function main()
{
rocket rocket 1,rocket2
}
A) rocket is a class with rocket 1 and rocket2 as its objects.height and weight are attributes of a rocket
B) rocket is a class with rocket1 and rocket2 as its attributes.height and weight are objects of the class rocket.
C) rocket is a class with rocket1,rocket2,height and weight as its attributes
D) rocket is a class with rocket1, rocket2, height, weight as its objects.
Answer & Description: A) rocket is a class with rocket 1 and rocket2 as its objects.height and weight are attributes of a rocket

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.