Solution Exercice 6 : Classe Book Python

Exercice 6

1. Définir une classe Book avec les attributs suivants : Title, Author (Nom complet), Price.
2. Définir un constructeur ayant comme attributs: Title, Author, Price.
3. Définir la méthode View() pour afficher les informations d'une instance object Book.
4. Ecrire un programme pour tester la classe Book.

Solution





 

Younes Derfoufi
CRMEF OUJDA

1 thought on “Solution Exercice 6 : Classe Book Python

Leave a Reply

Your email address will not be published. Required fields are marked *