Getsuyodev, Programming is mainly used when constructing an application. Programming requires knowledge of application domains, algorithms, and programming language expertise. Programming can be developed in different logic based on developer knowledge.

TQ – méthode abstraite

Thèmes des Questions – C# (C Sharp)



Remplacez les ……. dans le programme de gauche de telle façon que l’exécution affiche :

méthode d'instance1
méthode d'instance2
using System;
 …….. class classeA
 {
 public abstract void methInstance1( ) ;
 }
 interface InterfA
 {
 void methInstance2( ) ;
 }
 class classeB : classeA , InterfA
 {
 public ……..  void methInstance1( )
 {
 Console.WriteLine("méthode d'instance1");
 }
 public …….. void methInstance2( ) 
 {
 Console.WriteLine("méthode d'instance2");
 }
 }
 class Exercice
 {
 public static void Main( ) 
 {
 classeB obj = new classeB();
 obj.methInstance1( );
 obj.methInstance2( );
 Console.ReadLine();
 }
 }

Comments are closed, but trackbacks and pingbacks are open.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More