-
-
Save uncoded-ro/bd848dc29840bb6b3ee31a19c64c3797 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package ro.virtualcampus.app; | |
import ro.virtualcampus.obiectgrafic.*; | |
public class ObiecteGrafice { | |
public static void main(String args[]) { | |
Cerc cerc = new Cerc(2.3, 3.4, 1.5); | |
Dreptunghi dreptunghi = new Dreptunghi(5.2, 1.8, 3.4, 4.8); | |
System.out.println(cerc); | |
System.out.println(dreptunghi); | |
System.out.printf("Aria cerc: %.2f %n", cerc.aria()); | |
System.out.printf("Perimetru cerc: %.2f %n", cerc.perimetrul()); | |
System.out.printf("Aria dreptunghi: %.2f %n", dreptunghi.aria()); | |
System.out.printf("Perimetru dreptunghi: %.2f %n", dreptunghi.perimetrul()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment