Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Pandora;
- class Mammals {
- int age;
- int weight;
- Mammals(int a, int w) {
- age = a;
- weight = w;
- }
- }
- class feline extends Mammals {
- String breed;
- String country;
- feline(String c, String b, int age, int weight) {
- super(age, weight);
- breed = c;
- country = b;
- }
- }
- class tiger extends feline {
- String glass;
- int health;
- tiger(String e, int l, String c, String b, int age, int weight) {
- super(c, b, age, weight);
- glass = e;
- health = l;
- }
- }
- public class cat extends tiger {
- String name;
- String owner;
- cat(String n, String o, String glass, int health, String c, String b, int age, int weight, String souce) {
- super(glass,health,c,b,age,weight);
- name = n;
- owner = o;
- Shaurma BigMac = new Shaurma(age, weight, souce);
- }
- }
- class Shaurma {
- int freshness;
- int amount;
- String coys;
- Shaurma(int age, int weight, String soucu) {
- freshness = (int) Math.random() * 100 * (age / 100);
- amount = weight;
- coys = soucu;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement