Answered step by step
Verified Expert Solution
Question
1 Approved Answer
EA JRE System Library [ JavaSE - 1 . 8 ] v src v ## exceptionsimplementationsx## testDictionaryv ### test# testDictionaryLab 3 : Abstract Data Types
EA JRE System Library JavaSE v src v ## exceptionsimplementationsx## testDictionaryv ### test# testDictionaryLab : Abstract Data Types and TestDriven Development Background When writing the specifications for an ADT Abstract Data Type only answer what the methods will do and not how they will do it TDD allows us to focus on what to test for according to the contract defined in the ADT and not how the code had been written. Problem Description Consider the following requirements for the DictionaryADT: also known as maps or associative arrays This data type must be able to hold data in key value pairs where every key is unique. It must be possible to insert a key value pair into the dictionary. It must be possible to remove a pair in the dictionary based on the key. It must be possible to update the value of an existing key. We also require the ability to lookup a value based on the key. An example of a similar ADT can be found in java.util.Map.java. Instructions Working individually, write a possible contract specification as a Java interface for the DictionaryADT using the LabStartingCode project. Your contract must include the required functionalities as defined in the problem description as methods stubs with appropriate preconditions, postconditions, parameters, return values and expected exceptions using proper Javadoc notations. The specification should be documented so that the person who receives it could write an implementation without any extra information. Pair up with a classmate and complete the remaining steps. Compare and discuss the contract with your partner. Together, finalize the ADT to make sure all functionalities are specified appropriately in the contract. Follow the steps discussed in class to develop a complete set of JUnit tests to cover the functionality of each method. Include expected, boundary and strange values that are not specified in the preconditions. Note: Your tests should all fail as this point, as there is no implementation of a Dictionary class yet. However, consider at this point whether there is any functionality missing in the original specification. Revisit the specification with your partner and update it if necessary. Southern Alberta Institute of Technology Once you are satisfied with all the potential functionality of the DictionaryADT and you have a complete set of JUnit test to validate the functionalities, follow the TDD methodology to complete the implementation in the Dictionary class. Submit your completed zipped exported Eclipse project to Brightspace by the posted due date. Only one submission per pair is required, please note in your comment who your partner is
EA JRE System Library JavaSE
v src
v ## exceptionsimplementationsx## testDictionaryv ### test# testDictionaryLab : Abstract Data Types and TestDriven Development
Background
When writing the specifications for an ADT Abstract Data Type only answer what the methods
will do and not how they will do it TDD allows us to focus on what to test for according to the
contract defined in the ADT and not how the code had been written.
Problem Description
Consider the following requirements for the DictionaryADT: also known as maps or
associative arrays
This data type must be able to hold data in key value pairs where every key is unique.
It must be possible to insert a key value pair into the dictionary.
It must be possible to remove a pair in the dictionary based on the key.
It must be possible to update the value of an existing key.
We also require the ability to lookup a value based on the key.
An example of a similar ADT can be found in java.util.Map.java.
Instructions
Working individually, write a possible contract specification as a Java interface for the
DictionaryADT using the LabStartingCode project.
Your contract must include the required functionalities as defined in the problem
description as methods stubs with appropriate preconditions, postconditions,
parameters, return values and expected exceptions using proper Javadoc notations.
The specification should be documented so that the person who receives it could write
an implementation without any extra information.
Pair up with a classmate and complete the remaining steps.
Compare and discuss the contract with your partner. Together, finalize the ADT to make
sure all functionalities are specified appropriately in the contract.
Follow the steps discussed in class to develop a complete set of JUnit tests to cover the
functionality of each method. Include expected, boundary and strange values that are not
specified in the preconditions.
Note: Your tests should all fail as this point, as there is no implementation of a Dictionary
class yet. However, consider at this point whether there is any functionality missing
in the original specification.
Revisit the specification with your partner and update it if necessary.
Southern Alberta Institute of Technology
Once you are satisfied with all the potential functionality of the DictionaryADT and you have
a complete set of JUnit test to validate the functionalities, follow the TDD methodology to
complete the implementation in the Dictionary class.
Submit your completed zipped exported Eclipse project to Brightspace by the posted due
date. Only one submission per pair is required, please note in your comment who your
partner is
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started