ICSI213-IECE213 Project 4 Solved

35.00 $

Category:

Description

5/5 - (1 vote)

 

Part II: Project grading rubric

This project is selected for assessing the following student outcome:
SO2: Design, implement, and evaluate a computing-based solution to meet a given set of computing requirements in the context of the program’s discipline.

SO2

Levels of Performance

UNSATISFACTORY

DEVELOPING

SATISFACTORY

EXEMPLARY

Performance Indicator #1:

The software meets the specifications.

The design is efficient.
Specifications and implementation are separated.

All classes are completed correctly. All required functionalities are completed correctly.

All source codes are well formatted and documented with correct Javadoc style comments.

The software doesn’t

compile and/or doesn’t include all requirements.

The software compiles but it

doesn’t meet all requirements or there are issues.

The software compiles,

meets all the requirements with some minor issues.

The software compiles,

meets all the requirements with no issues.

/5

/14

/24

/35

Performance Indicator #2:

The design is efficient, and the UML diagram is correct.

For all class diagrams, visibility, name, return type/parameter type are correct for each member of a class.

Class relationships are correct.

The design is efficient, and the UML diagram is incorrect.

The design is efficient, and the UML diagram is correct for some classes.

The design is efficient, and the UML diagram is correct with some issues.

The design is efficient, and the UML diagram is correct with no issues.

/2

/4

/7

/10

Performance Indicator #3:

The software is completely tested.

The implementation is not

completed or tested.

The implementation is

somewhat completed and some classes are tested.

The implementation is

completed and all classes are tested with minor issues.

The implementation is

completed and all classes are tested with no issues.

/2

/6

/10

/15

Level of Performance Column Total

3

Total Points Awarded

Feedback to the student by TA/Grader:

Analysis:

  • Does the software meet the exact specification / customer requirements?
  • Does the software solve the exact problem? Design:
  • Is the design efficient? Code:
  • Are there errors?
  • Are code conventions followed?
  • Does the software use the minimum computer resource (computer memory and processingtime)?
  • Is the software reusable?
  • Are comments completely written in Javadoc format?
    1. Class Javadoc comments must be included before a class header.
    2. Method Javadoc comments must be included before a method header.
    3. More inline comments (in either single line format or block format) must be includedinside each method body.
    4. All comments must be completed in correct format such as tags, indentation etc.

    Debug/Testing:

• Are there bugs in the software? Documentation:

• Complete all documentations that are required. Overall Feedback:

4

Part III: Examples of UML diagrams and Javadoc style comments
To complete a project, the following steps of a software development cycle should be followed. These steps are not pure linear but overlapped.

Analysis-design-code-test/debug-documentation.

  1. 1)  Read project description to understand all specifications(Analysis).
  2. 2)  Create a design (an algorithm for method or a UML class diagram for a class) (Design)
  3. 3)  Create Java programs that are translations of the design. (Code/Implementation)
  4. 4)  Test and debug, and (test/debug)
  5. 5)  Complete all required documentation. (Documentation)

The following shows a sample design. By convention.

  • Constructors and constants should not be included in a class diagram.
  • For each field (instance variable), include visibility, name, and type in the design.
  • For each method, include visibility, name, parameter type(s) and return type in the design.o DON’T include parameter names, only parameter types are needed.
  • Show class relationships such as dependency, inheritance, aggregation, etc. in the design. Don’t includethe driver program and its helper class since they are for testing purpose only.

5

import java.util.Random;

Class comments must be written in Javadoc format before the class header. A description of the class, author information and version information are required.

/**
 * Representing a dog with a name.
 * @author Qi Wang
 * @version 1.0
 */

public class Dog{ /**

Comments for fields are required.

open {

Method comments must be written in Javadoc format before the method header. the first word must be a capitalized verb in the third person. Use punctuation marks properly.

TAB

TAB

 * The name of this dog

*/

private String name;

/**
 * Constructs a newly created Dog object that represents a dog with an empty name.
 */

public Dog(){

this(“”);

open {

A description of the method, comments on

parameters if any, and comments on the return type

TAB

TAB

}

      /**
       * Returns the name of this dog.
       * @return The name of this dog
       */

public String getName(){ return this.name;

}

      /**
       * Changes the name of this dog.
       * @param name The name of this dog
       */

public void setName(String name){ this.name = name;

}

}

/**
* Constructs a newly created Dog object withifaanyamaer.e required.

 * @param name The name of this dog

*/

public Dog(String name){ this.name = name;

A Javadoc comment for a formal parameter consists of three parts:
– parameter tag,
– a name of the formal parameter in the design ,

(The name must be consistent in the comments and the header.)
– and a phrase explaining what this parameter specifies.
A Javadoc comment for return type consists of two parts: – return tag,

– and a phrase explaining what this returned value specifies

/**
 * Returns a string representation of this dog. The returned string contains the type of
 * this dog and the name of this dog.
 * @return A string representation of this dog
 */

public String toString(){
return this.getClass().getSimpleName() + “: ” + this.name;

}

/**
 * Indicates if this dog is "equal to" some other object. If the other object is a dog,
 * this dog is equal to the other dog if they have the same names. If the other object is
 * not a dog, this dog is not equal to the other object.
 * @param obj A reference to some other object
 * @return A boolean value specifying if this dog is equal to some other object
 */

public boolean equals(Object obj){
//The specific object isn’t a dog. if(!(obj instanceof Dog)){

return false;

}

      //The specific object is a dog.

Dog other = (Dog)obj;
return this.name.equalsIgnoreCase(other.name);

More inline comments can be included in single line or block comments format in a method.

} }

6

Part IV Project description

In this project, you will design, implement and test two ADTs: ADT Binary Search Tree and ADT Address book. Please read the following requirements.

A. ADT Binary Search tree:
A binary search tree can be used to store a list of comparable objects. In a generic binary search tree class, constrain E(the type parameter) to be the class types that implement Comparable interface. In the class header, add the interface as the upper bound to E.

public class BinarySearchTree<E extends Comparable<E>>

Specifications of the ADT binary search tree:

  • Construct a binary search tree.
  • Retrieve the root of this tree.
  • Change the root of this tree if supported.
  • Check if this tree is empty.
  • Make this tree empty.
  • Search an element in this tree.
  • Insert an element into this tree.
  • Delete an element from this tree.
  • Construct an iterator of this tree.
  • Get a reference to the element of a node.You should design these operations in bold in a super class and put the rest in a sub class. To support this class, the following classes must be designed and implemented:
  • Generic tree node class: a tree node contains an element, a left reference, and a right reference.
  • Generic tree iterator class: a class implementing Iterator interface and provides traversal operations.
  • Tree exception class: used for the abnormal situations from some tree operations.These classes must be tested first before they will be used in the second ADT: ADT address book. For testing, start with an empty binary search tree, insert a list of integers, invoke other methods to test completely. Write a driver and a helper class for the driver.

    public static void start()…{
    BinarySearchTree<Integer> tree = new BinarySearchTree<Integer>(); //Fill the tree.
    create(list);
    //Display the tree.
    display(list);

    }

B. ADT Address Book:
An ADT Address book maintains a list of contacts (friends and families) in a binary search tree. The ADT is not a generic class since the element of a node is a contact. This ADT is implemented using a binary search tree as the data

7

structure. You will use the binary search tree from part A. The following shows values a contact contains. Assume that all contacts have unique full names.

first_name last_name street city state zipcode phone

James Butt 6649 N Blue Gum St New Orleans LA 70116 504-621-8927

Specifications of the ADT address book:
Note: most of the operations are executed in the underlying binary search tree of this address book.

  • Construct an address book.
  • Search a contact in this address book.
  • Insert a contact into this address book.
  • Delete a contact from this address book.
  • Check if this address book is empty.
  • Make this address book empty.
  • Find all contacts in the same zip code and return them sorted in a linked list(use java.util.LinkedList<E>).A specific zip code is passed into the method as a parameter.
  • Find all contacts in the same city and return them sorted in a linked list(use java.util.LinkedList<E>). Aspecific city is passed into the method as a parameter.
  • Find all contacts whose phone numbers have the same area code and return them sorted in a linkedlist(use java.util.LinkedList<E>). A specific area code is passed into the method as a parameter. To support the ADT Address book, two more classes are required: Address and Contact.

}

•

•

An address contains street, city, state and zip code. Write a class to represent an address object. first_name last_name street city state zipcode phone

James Butt 6649 N Blue Gum St New Orleans LA 70116 504-621-8927
A contact contains a full name, an address(an Address object) and a phone number. Write a class to

represent a contact object.

first_name last_name address phone

James Butt 6649 N Blue Gum St New Orleans LA 70116 504-621-8927

Now it is time to test the ADT address book. For testing, Write a driver and a helper class for the driver. Start with an

empty address book, fill the address book with contact objects.

public static void start()…{
AddressBook list = new AddressBook();

//Fill the address book. create(list);
//Display the address book. display(list);

Use the contact input data on the next page to make contact objects for testing. Please copy the data into a text file first.

8

first_name last_name street

city

New Orleans Brighton Bridgeport Anchorage Hamilton Ashland Chicago

San Jose Sioux Falls Baltimore Kulpsville Middle Island Los Angeles Chagrin Falls Laredo Phoenix

Mc Minnville Milwaukee Taylor Rockford Aston

San Jose Irving
Albany Middlesex Stevens Point Shawnee Easton

New York Conroe Columbus
Las Cruces Ridgefield Park Dunellen

New York Metairie
New York Camarillo
San Antonio Abilene Prineville Overland Park Fairbanks Miami

state zipcode

LA 70116 MI 48116 NJ 8014 AK 99501 OH 45011 OH 44805 IL 60632 CA 95111 SD 57105 MD 21224 PA 19443 NY 11953 CA 90034 OH 44023 TX 78045 AZ 85013 TN 37110 WI 53207 MI 48180 IL 61109 PA 19014 CA 95111 TX 75062 NY 12204 NJ 8846 WI 54481 KS 66218 MD 21601 NY 10011 TX 77301 OH 43215 NM 88011 NJ 7660 NJ 8812 NY 10025 LA 70002 NY 10011 CA 93012 TX 78204 KS 67410 OR 97754 KS 66204 AK 99708 FL 33196

phone

504-621-8927 810-292-9388 856-636-8749 907-385-4412 513-570-1893 419-503-2484 773-573-6914 408-752-3500 605-414-2147 410-655-8723 215-874-1229 631-335-3414 310-498-5651 440-780-8425 956-537-6195 602-277-4385 931-313-9635 414-661-9598 313-288-7937 815-828-2147 610-545-3615 408-540-1785 972-303-9197 518-966-7987 732-658-3154 715-662-6764 913-388-2079 410-669-1642 212-582-4976 936-336-3951 614-801-9788 505-977-3911 201-709-6245 732-924-7882 212-860-1579 504-979-9175 212-675-8570 805-832-6163 210-812-9597 785-463-7829 541-548-8197 913-413-4604 907-231-4722 305-606-7291

James Josephine Art
Lenna Donette Simona Mitsue Leota Sage
Kris Minna Abel
Kiley Graciela Cammy Mattie Meaghan Gladys Yuki Fletcher Bette Veronika Willard Maryann Alisha Allene Chanel Ezekiel Willow Bernardo Ammie Francine Ernie Albina Alishia Solange Jose Rozella Valentine Kati Youlanda Dyan Roxane Lavera

Butt Darakjy Venere Paprocki Foller Morasca Tollner Dilliard Wieser Marrier Amigon Maclead Caldarera Ruta Albares Poquette Garufi
Rim Whobrey Flosi
Nicka Inouye Kolmetz Royster Slusarski Iturbide Caudy Chui Kusko Figeroa Corrio Vocelka Stenseth Glick
Sergi Shinko Stockham Ostrosky Gillian Rulapaugh Schemmer Oldroyd Campain Perin

6649 N Blue Gum St 4 B Blue Ridge Blvd
8 W Cerritos Ave #54 639 Main St

34 Center St
3 Mcauley Dr
7 Eads St
7 W Jackson Blvd
5 Boston Ave #88
228 Runamuck Pl #2808 2371 Jerrold Ave
37275 St Rt 17m M
25 E 75th St #69
98 Connecticut Ave Nw 56 E Morehead St
73 State Road 434 E 69734 E Carrillo St
322 New Horizon Blvd
1 State Route 27
394 Manchester Blvd
6 S 33rd St
6 Greenleaf Ave
618 W Yakima Ave
74 S Westgate St
3273 State St
1 Central Ave
86 Nw 66th St #8673
2 Cedar Ave #84
90991 Thorburn Ave 386 9th Ave N
74874 Atlantic Ave
366 South Dr
45 E Liberty St
4 Ralph Ct
2742 Distribution Way 426 Wolf St
128 Bransten Rd
17 Morena Blvd
775 W 17th St
6980 Dorsett Rd
2881 Lewis Rd
7219 Woodfield Rd 1048 Main St
678 3rd Ave

9

Erick Fatima Jina Kanisha Emerson Blair Brock Lorrie Sabra Marjory Karl Tonette Amber Shenika Delmy Deeanna Blondell Jamal Cecily Carmelina Maurine Tawna Penney Elly

Ilene Vallie Kallie Johnetta Bobbye Micaela Tamar Moon Laurel Delisa Viva
Elza Devorah Timothy Arlette Dominque Lettie Myra Stephaine Lai Stephen Tyra

Ferencz Saylors Briddick Waycott Bowley Malet Bolognia Nestle Uyetake Mastella Klonowski Wenner Monarrez Seewald Ahle
Juhas Pugh Vanausdal Hollack Lindall Yglesias Buvens Weight Morocco Eroman Mondella Blackwood Abdallah Rhym Rhymes Hoogland Parlato Reitler Crupi Toelkes Lipke Chickering Mulqueen Honeywell Dickerson Isenhower Munns Barfield Gato Emigh Shields

20 S Babcock St
2 Lighthouse Ave
38938 Park Blvd
5 Tomahawk Dr
762 S Main St
209 Decker Dr 4486WOSt#1
39 S 7th St
98839 Hawthorne Blvd #6101 71 San Mateo Ave
76 Brooks St #9
4545 Courthouse Rd
14288 Foster Ave #4121
4 Otis St
65895 S 16th St
14302 Pennsylvania Ave
201 Hawk Ct
53075 Sw 152nd Ter #615
59 N Groesbeck Hwy
2664 Lewis Rd
59 Shady Ln #53
3305 Nabell Ave #679
18 Fountain St
7W32ndSt
2853 S Central Expy
74 W College St
701 S Harrison Rd
1088 Pinehurst St
30 W 80th St #1995
20932 Hedley St
2737 Pistorio Rd #9230 74989 Brandon St
6 Kains Ave
47565 W Grand Ave
4284 Dorigo Ln
6794 Lake Dr E
31 Douglas Blvd #950
44 W 4th St
11279 Loytan St
69 Marquette Ave 70WMainSt
461 Prospect Pl #316
47154 Whipple Ave Nw
37 Alabama Ave
3777 E Richmond St #900
3 Fort Worth Ave

Fairbanks AK Hopkins MN Boston MA Los Angeles CA Madison WI Philadelphia PA New York NY Tullahoma TN Columbia SC Wayne PA Flemington NJ Westbury NY Jenkintown PA Van Nuys CA Providence RI Huntingdon Valley PA Providence RI Monroe Township NJ Austin TX Littleton CO Milwaukee WI New York NY Anchorage AK Erie PA Glen Burnie MD Boise ID San Francisco CA Chapel Hill NC San Carlos CA Concord CA London OH Wellsville NY Baltimore MD Newark NJ Chicago IL Newark NJ Clovis NM Staten Island NY Jacksonville FL Hayward CA Beachwood OH Euless TX Gardena CA Evanston IL Akron OH Philadelphia PA

99712 907-741-1044 55343 952-768-2416 2128 617-399-5124 90006 323-453-2780 53711 608-336-7444 19132 215-907-9111 10003 212-402-9216 37388 931-875-6644 29201 803-925-5213 19087 610-814-5533 8822 908-877-6135 11590 516-968-6051 19046 215-934-8655 91405 818-423-4007 2909 401-458-2547 19006 215-211-9589 2904 401-960-8259 8831 732-234-1546 78731 512-486-3817 80126 303-724-7371 53214 414-748-1374 10009 212-674-9610 99515 907-797-9628 16502 814-393-5571 21061 410-914-9018 83707 208-862-5339 94104 415-315-2761 27514 919-225-9345 94070 650-528-5783 94520 925-647-3298 43140 740-343-8575 14895 585-866-8313 21215 410-520-4832 7105 973-354-2040 60647 773-446-5569 7104 973-927-3447 88101 505-975-8559 10309 718-332-6527 32254 904-775-4480 94545 510-993-3758 44122 216-657-7668 76040 817-914-7518 90247 310-774-7643 60201 847-728-7286 44302 330-537-5358 19106 215-255-1641

10

Tammara Cory Danica Wilda Elvera Carma Malinda Natalie Lisha

Wardrip Gibes Bruschke Giguere Benimadh Vanheusen Hochard Fern Centini

4800 Black Horse Pike 83649 W Belmont Ave 840 15th Ave
1747 Calle Amanecer #2 99385 Charity St #840 68556 Central Hwy

55 Riverside Ave 7140 University Ave 64 5th Ave #1153

Burlingame San Gabriel Waco Anchorage San Jose
San Leandro Indianapolis Rock Springs Mc Lean

CA 94010 CA 91776 TX 76708 AK 99501 CA 95110 CA 94577 IN 46202 WY 82901 VA 22102

650-803-1936 626-572-1096 254-782-8569 907-870-5536 408-703-8505 510-503-7169 317-722-5066 307-704-8713 703-235-3937

11

  • Project04-main-jiuerd.zip