No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I have some problem with this question: my Family class is as below: [code]import java.util.ArrayList; import java.util.Collection; import java.io.*; public class Family { private Adult father; private Adult mother; private Child[] children; private Dog ourDog; private Cats ourCat; private Rabbit ourRabbit; int Age; public Family() { } public Family(Adult father, … |
|
How can I override a method in a base class without using the @Override sign? For example the class Human below overrides some methods in the class Mammal. Do print the output correctly without @ signs in objects. Convert them correctly before outputting. [code]import java.util.*; public abstract class Human extends … |
|
Re:
Hi, I had posted this question before and I did appreciate the response I got. However I still need some little help as: [B]1.In the addMovieGoers method check that every member of the collection is a human and that they are old enough to watch the movie, if not throw … |
|
How can I use the Exceptions I have created below in the Cinema class? [B]//IllegalAgeException class[/B] [CODE] public class IllegalAgeException extends Exception { /** * Creates a new instance of <code>IllegalAgeException</code> without detail message. */ String exception; public IllegalAgeException() { exception="Unknown"; } /** * Constructs an instance of <code>IllegalAgeException</code> with … |
|
Re:
Hi, can someone help me modify this code to achieve the following: Add methods to your Human that return collections of arms and legs. implement these methods by iterating through the collection of limbs and checking what type of limb they are. Note that you will need to use the … |
|
Hi, I have a class MovieRating below: [code] import java.util.*; public class MovieRating { private Map ageMap = new HashMap(); private String movieRating; public MovieRating() { ageMap.put("PG", 18); //parental Guidance ageMap.put("G", 4); //general viewing ageMap.put("A", 27); //Adult material } public String getRating() { return movieRating; } public boolean getStatus(String rating, … |
|
[B]Hi, I'm new in java. Can someone help me with this problem. I've attempted it and the code is as shown after the questions:[/B] [B][U]Question:[/U][/B] 1. Create a new Movie class which has two properties, title and rating. 2. Create a new Cinema class, add method addMovieGoers which takes a … |
|
Hi, below is the Question and MYCODE. I've attempted it but there still some problems that I'd appreciate if someone help me thrush out. [B][U]QUESTION[/U][/B] 1. Create an interface called limb and modify your arm and leg classes so that they implement it. 2. Create a new abstract class called … |