Problem Statement
To get started:
For this problem use the code provided in either example 1 or example 2 as a template.
This provided code will actually serve as both a framework and template.
Copy the provided example code into a new project working directory (WD).
Copy NumberRange.java and SmartNumber.java into the WD (these files are from the challenges in Chapter 603).
You will rename two classes so they work with NumberRange. Assuming you are using example 1 as a base, then rename as follows:
Rename RectangleView to NumberRangeView
Rename RectangleController to NumberRangeController
Modify the code in NumberRangeView and NumberRangeController as shown in the examples (for your NumberRange model).
Expected Application Behavior
The user user should be able to open a NumberRangeView (by running NumberRangeView)
The start and stop variables of NumberRange should be editable fields on the view
The view should show at least nine output fields (hint: the method "getSummary" may be used)
When the Calculate button is clicked, the output fields should show the correct output values for the entered input fields (start and stop)
Grading
The grader will check the behavior of NumberRangeView to ensure it matches the behavior described in the section "Expected Application Behavior" above.
For this assignment, we will use
these grading rules
.
Introduction To Objects With Java (Chapter 901 - Model-View-Controller (MVC))
Chapter 901 - Model-View-Controller (MVC)
Challenge #2 - Build MVC on NumberRange Model Class
Contents
Overview
Concepts
Example 1
Example 2
Challenge
Chapter
Top
Search
TOC