Question

#1) If a concrete (non-abstract class is using an interface, it must do which of the...

#1)

If a concrete (non-abstract class is using an interface, it must do which of the following?

contain the same methods as the interface

inherit the properties of the interface

create an interface object

all of the above

#2) Can multiple catch blocks be executed for a single try statement?

Yes
No

#3) Which of the following is the default access specifier of a class member variable?

Private

Public

Protected

Internal

#4) Which of the following keyword is used for including namespaces in a program in C#?

imports

using

include

exports

#5) Which of the following is the correct way to define and initialize an array of four integers in C#?

int[] a;
a = new int[3];
a[0] = 25;
a[1] = 30;
a[2] = 40;
a[3] = 5;
int[] a;
a = new int{25, 30, 40, 5};
int[] a;
a = new int[4]{25, 30, 40, 5};

#6) Which of the following is the markdown for displaying an image with no alt text using the file example.jpg that is located in the same directory as the markdown file?

![example](example.jpg)

![example](images/example.jpg)

![](example.jpg)

[ ](example.jpg)

#7) What is the output of the following code?

{    
     int value = 5;    
     try {       
        int i;       
        for (i = 5; i > -2; --i)       
        value = (value / i);    
    } catch (DivideByZeroException e) {       
        Console.Write("DIV0!");   
    }
    Console.Write(value);
}

1 0.25 0.83 0.42 0.42 0 DIV0!

1 0.24 0.83 0.42 0.42 DIV0! 0

DIV0!0

5 4 3 2 1 0 -1 -2

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Answer 1:inherit the properties of the interface

Answer 2: No, we can have mulitple blocks but only 1 will be executed
Answer 3:private
Answer 4:using
Answer 5:a = new int[3];
a[0] = 25;
a[1] = 30;
a[2] = 40;
a[3] = 5;
Answer 6:
![example](example.jpg)
Answer 7:
DIV0!0

Add a comment
Know the answer?
Add Answer to:
#1) If a concrete (non-abstract class is using an interface, it must do which of the...
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
  • Need Help ASAP!! Below is my code and i am getting error in (public interface stack)...

    Need Help ASAP!! Below is my code and i am getting error in (public interface stack) and in StackImplementation class. Please help me fix it. Please provide a solution so i can fix the error. thank you.... package mazeGame; import java.io.*; import java.util.*; public class mazeGame {    static String[][]maze;    public static void main(String[] args)    {    maze=new String[30][30];    maze=fillArray("mazefile.txt");    }    public static String[][]fillArray(String file)    {    maze = new String[30][30];       try{...

  • Comparing the insertion and removing performance between ALPQueue with HeapPQueue. Requirements: 1/ Task1: implement a concrete...

    Comparing the insertion and removing performance between ALPQueue with HeapPQueue. Requirements: 1/ Task1: implement a concrete ALPQueue class (an ArrayList based priority queue) that extends the AbstractPQueue discussed in the class, along with PQueue.java, ArrayList.java, List.java, PQEntry.java , EntryComparitor.java, and OutOfRangeException.java given in the class (any other implementation of above classes that are not compatible with List interface and AbstractPQueue class will not receive any credit). 2/ Task2: implement a concrete HeapPQueue class (a Heap based priority queue) that extends...

  • Assignment4: Evaluate Arithmetic Expressions. Requirements: Implement a concrete ArrayStack class that extends the IStack interface as...

    Assignment4: Evaluate Arithmetic Expressions. Requirements: Implement a concrete ArrayStack class that extends the IStack interface as we discussed in the class (any other different Stack class implementation, even if it is implemented by yourself, will not receive any credit). Write a test class called Evaluate and a method that evaluates an arithmatic expression, which is given by a string. import java.util.Scanner; public class Evaluate { public static void main(String[] args) } // your implementation // obtain user's input from keyboard...

  • In the USIntsArrayList Class, implement the USIntsArrayListInterface Interface (which is really just the UnSortedInts Class without...

    In the USIntsArrayList Class, implement the USIntsArrayListInterface Interface (which is really just the UnSortedInts Class without the logic. All you are doing in this class is providing the same functionality as UnSortedInts, but using an ArrayList to hold the data. Document appropriately Thank you, package arrayalgorithms; import java.util.ArrayList; /** * Title UnSorted Ints stored in an Array List * Description: Implement all the functionality of the UnSortedInts * class using an ArrayList * @author Khalil Tantouri */ public class USIntsArrayList...

  • Java -Create an interface and implement it In the murach.db package, create an interface named IProductDB....

    Java -Create an interface and implement it In the murach.db package, create an interface named IProductDB. This interface should specify this abstract method: public abstract Product get(String productCode); Modify the ProductDB class so it implements the IProductDB interface. Write the code for the new ‘get’ method. Then remove the getProductByCode method. In the Main class, modify the code so it works with the new ProductDB class. This code should create an instance of the IProductDB interface like this: IProductDB db...

  • Step One This is the Measurable interface we saw in class; you will need to provide...

    Step One This is the Measurable interface we saw in class; you will need to provide this class; this is it in its entirety (this is literally all you have to do for this step): public interface Measurable double getMeasure(); Step Two This is the Comparable interface that is a part of the standard Java library: public interface Comparable int compareTo (Object otherObject); Finish this class to represent a PiggyBank. A PiggyBank holds quarters, dimes, nickels, and pennies. You will...

  • ceinterface Interface1 Abstract eeinterfaces Interface ceinterface Interface Classi Class Class3 Classe Interfacet obji - new class3();...

    ceinterface Interface1 Abstract eeinterfaces Interface ceinterface Interface Classi Class Class3 Classe Interfacet obji - new class3(); Abstracti obj2 = new Class1(); object obj3 = new Class2); class3 obj4 new Class4(); a) [1 pt) Is obji instanceof Interface? O True O False O True O False b) f1 pt) Is obj3 instanceof Interface1? c) (1 pt] Is obj4 instanceof Interfaces ? O True O False d) (1 pt) Is obj2 instanceof Interface1? O True False e) (2 pts each] State the...

  • In the Employee class, add an implementation for the calculatePension() method declared in the interface. Calculate...

    In the Employee class, add an implementation for the calculatePension() method declared in the interface. Calculate the pension to date as the equivalent of a monthly salary for every year in service. 4) Print the calculated pension for all employees. ************** I added the interface and I implemented the interface with Employee class but, I don't know how can i call the method in main class ************ import java.io.*; public class ManagerTest { public static void main(String[] args) { InputStreamReader...

  • Which of the following is responsible for the execution of all applications developed using the .NET...

    Which of the following is responsible for the execution of all applications developed using the .NET library? A Common Type System B Base Class Libraries C Common Intermediate Language D Common Language Runtime What is a function of the Solution Explorer window in Visual Studio? This task contains the radio buttons and checkboxes for options. The shortcut keys to perform this task are A to H and alt+1 to alt+9. A It shows the hierarchy of files and folders in...

  • package Lab11; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class Lab10 {    public...

    package Lab11; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; public class Lab10 {    public static void main (String [] args)    {    // ============================================================    // Step 2. Declaring Variables You Need    // These constants are used to define 2D array and loop conditions    final int NUM_ROWS = 4;    final int NUM_COLS = 3;            String filename = "Input.txt";    // A String variable used to save the lines read from input...

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