What is an abstract method

Assignment Help Programming Languages
Reference no: EM13804783

1. If a class contains an abstract method, the class must be declared _____.

abstract

public

private

None of the above

Question 2. What is an abstract class?

A generalized class used only to create related subclasses

A class without any superclasses

A class from which we create many instances

Any subclass with more than one superclass

Question 3. What is an abstract method?

Any method in an abstract class

A method without a body that is declared with the reserved word abstract

A method which cannot be inherited

A method that takes an abstract object as a parameter and returns nothing

Question 4. Which of the following classes is most likely an abstract class?

Vehicle

BlueSpruce

HandSaw

Goldfish

Question 5. In terms of object-oriented programming, a _____ is a mechanism that forces a programmer to adhere to specific rules when developing an application.

contract

base class

requirements analysis

method signature

None of the above

Question 6. An abstract method can be declared in which of the following?

Abstract classes

Any base class

Concrete classes

A and B

A and C

B and C

Question 7. Which language allows implementation of multiple inheritance using only base classes?

Java

C#

C++

All of the above

Question 8. Which of the following class definitions defines a legal abstract class?

class abstract Dog {

void Eat();

}

public abstract class Dog {

void Eat (){}

}

abstract private class Dog {

void Eat ();

}

public class abstract Dog {

void Eat (){}

}

Question 9. Which of the following declares an abstract method in an abstract C# class?

public abstract Calc();

public abstract void Calc();

public void Calc() {}

public void abstract Calc();

Question 10. Which of the following statements is true?

Interfaces contain a list of methods to be implemented.

Interfaces are classes with one or more unimplemented methods.

Interfaces can be instantiated just like regular classes.

Besides the naming convention, there is no difference between an interface and a class.

Reference no: EM13804783

Questions Cloud

Term paper on language development hypotheses : Term Paper on Language Development Hypotheses
Explain what are two ways toyota operation changed : What are two ways Toyota operation might have changed if it had focused on low cost instead of quality
Research on any topic relating to hair care : Please do some research on any topic relating to hair care, nail care, eye care, acne, or skin care. Please explain why you chose this topic and summarize in your own words what you learned about the topic.
Effects of low information security in an organization : Write 2 paragraphs on the effects of low information security in an organization
What is an abstract method : What is an abstract class? What is an abstract method
Problems based on probability distribution : What is the proportion of trucks that can be expected to travel either between 34 and 50 thousand miles?
Write paper that addresses marketing from global perspective : Write a research paper that addresses marketing from a global perspective. The main objective of this assignment is to help you understand the influence of environmental factors on organizations business decisions.
What are two ways fedex and the united states postal service : What are two ways Fedex and the United States Postal Service uses their strategies for attracting customers are different
Identify and analyse the key environmental changes : Identify and analyse the key environmental changes that impact on reward in the organisation and the business context that drives reward strategy. In doing this be sure to include external factors.

Reviews

Write a Review

Programming Languages Questions & Answers

  Prepare a scenario diagram for problem

Write a PhoneContact class that gets initialized with a phone number and a label. The phone number should follow one of the formats of the Phone class from the previous assignment - Prepare a scenario diagram for Problem 1, Brief discussion for Pro..

  Write pseudo algorithm to input age

Write a pseudo algorithm that inputs Age, displays "Yes, you can vote" if Age is 18 or older and displays "You are too young to vote" if Age is less than 18.

  Write function which computes and returns sum of n numbers

Write a function, sumsteps2, which computes and returns sum of 1 to n in steps of 2, where n is argument passed to function. For example if 11 is passed, it will return 1 + 3 + 5 + 7 + 9 = 11.

  Program that will call a function called writedatatofile

Write a program that will call a function called writeDataToFile to prompt a user for their first name, last name and zip code, and print this information to a file called "UserData.txt".

  Write a program that calculates a customer monthly bill

Write a program that calculates a customer's monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were used. It should the display the total charges

  Write program that inputs single integer in digital river

A digital river is sequence of number where number following is n+ sum of its digits for example 12345=12345+15=12360. Write a program that inputs single integer n (1

  Select a game that can be mapped by an automata

Select a game that can be mapped by an automata. This means the game will have a finite set of states (for whichcertain conditions are true) and an exit condition.

  Non-negative positions in positions

Write a predicate pick(+From, +Positions, -Picked) that unifies Picked with an atom consisting of the characters in From at the zero-based, non-negative positions in Positions.

  Program to create professor rating class

Write down program to create Professor Rating class comprising of professor ID and three ratings. Three ratings are utilized to estimate easiness.

  Write a program that must be able to estimate profits

The Barking Lot is a dog boarding facility. It provides boarding for any number of days and additional services such as grooming and walking. The Barking Lot currently has three employees, a list of 40 dog clients, and room to board eight dogs at ..

  Write program which reads in weight in pounds and ounces

Write the program which reads in the weight in pounds and ounces and putputs equivalent weight in kilograms and grams. Utilize at least three functions.

  Describe issues-web site designers when adding multimedia

Describe some of the issues web site designers must consider when adding multimedia to a web site. Consider issues such as bandwidth, server load, or others you consider to be important. Please provide references.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd