PRG 421 Week 2 Individual Assignment ArrayList Program

Write a Java program (non-GUI preferred) to demonstrate the use of an ArrayList.
The program should allow a user to do the following:

  • Add, edit, delete different types of animals
  • Select an animal, and the corresponding characteristics will be displayed (such as color, vertebrate or invertebrate, can swim, etc.)
  • The program must use ArrayList(s) to work with these animal objects.

Include a brief documentation (in the code or in a separate document) to explain the input (if any), processing and output of the program.

Submit your assignment using the Assignment Files tab above.



This slideshow requires JavaScript.


This assignment includes a zip file.

  • Attachments
    • PRG421_Week_2_Individual_Assignment.zip (149.31 KB)
      • java code
      • Netbeans project
        • PRG421_Week_2_ArrayList
          • build
            • classes
              • .netbeans_automatic_build
              • .netbeans_update_resources
              • Animal.class
              • PRG421Week2.class
          • build.xml
          • manifest.mf
          • nbproject
            • build-impl.xml
            • genfiles.properties
            • private
              • private.properties
            • project.properties
            • project.xml
          • src
          • test
        • PRG421-Week-2-Individual-Assignment-Screenshot-1.png
        • PRG421-Week-2-Individual-Assignment-Screenshot.png
      Preview random excerpt
      }
      xxxxxx xxxxxx(xxxxxx _xxxx, xxxxxx _xxxxx, xxxxxxx _xxxxxxx) {
      xxxxxxx(_xxxx);
      xxxxxxxx(_xxxxx);
      xxxxxxxxxx
      (_canSwim); }
      xxxxxx
      String getType() {
      xxxxxx
      type; }
      xxxxxx
      String getColor() {
      xxxxxx
      color; }
      xxxxxx xxxx xxxxxxx(xxxxxx _xxxx) {
      xxxx.xxxx = _xxxx;
      - - - more text follows - - -
      Preview random excerpt
      xxxxxxx xxxxxx xxxx xxxxxxxxxx(xxxxxx x, xxxxxx xxxx, xxxxxx xxxxx, xxxxxxx xxxxxxx) {
      x.xxxxxxx(xxxx);
      x.xxxxxxxx(xxxxx);
      x.xxxxxxxxxx(xxxxxxx);
      }
      xxxxxxx
      static void deleteAnimal(Animal a) {
      xxx
      index =
      x
      ;
      xxx
      (
      xxxxxx
      an: animals) {
      xx
      (an.getCanSwim() ==
      x
      .getCanSwim() &&
      xx
      .getColor().
      xxxxxx
      (a.getColor()) && an.
      xxxxxxx
      ().equals(a.
      xxxxxxx
      ())) {
      xxxxx
      ; }
      xxxx
      xxxxx
      ++; }
      xxxxxxx.xxxxxx(xxxxx);
      }
      - - - more text follows - - -
      Preview random excerpt
      }
      xxxxxx xxxxxx(xxxxxx _xxxx, xxxxxx _xxxxx, xxxxxxx _xxxxxxx) {
      xxxxxxx(_xxxx);
      xxxxxxxx(_xxxxx);
      xxxxxxxxxx
      (_canSwim); }
      xxxxxx
      String
      xxxxxxx
      () {
      xxxxxx
      type; }
      xxxxxx
      xxxxxx
      getColor() {
      xxxxxx
      color; }
      xxxxxx xxxx xxxxxxx(xxxxxx _xxxx) {
      xxxx.xxxx = _xxxx;
      - - - more text follows - - -
      Preview random excerpt
      xxxxxxx xxxxxx xxxx xxxxxxxxxx(xxxxxx x, xxxxxx xxxx, xxxxxx xxxxx, xxxxxxx xxxxxxx) {
      x.xxxxxxx(xxxx);
      x.xxxxxxxx(xxxxx);
      x.xxxxxxxxxx(xxxxxxx);
      }
      xxxxxxx
      static void deleteAnimal(Animal a) {
      xxx
      xxxxx
      =
      x
      ;
      xxx
      (Animal
      xx
      : animals) { if (
      xx
      .getCanSwim() ==
      x
      .getCanSwim() &&
      xx
      .getColor().equals(
      x
      .getColor()) &&
      xx
      .
      xxxxxxx
      ().equals(a.getType())) {
      xxxxx
      ; }
      xxxx
      xxxxx
      ++; }
      xxxxxxx.xxxxxx(xxxxx);
      }
      - - - more text follows - - -



    Purchasing Instruction
    List Price: $15
    Buy Now

    Buy More Save More
    Buy at least TWO items & save up to 30% OFF your ENTIRE order!
    Rack up instant rebates in your shopping cart. Simply add items to your cart, and see the savings add up.
    Discounts will automatically be applied on eligible orders.

    Add to Cart

    FLASH SALE

    $65

    $83 Save $18
    PRG 421 Entire Course