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 SmartNumber.java into the WD (this files is from the first challenge in Chapter 603).
You will rename two classes so they work with SmartNumber. Assuming you are using example 1 as a base, then rename as follows:
Rename RectangleView to SmartNumberView
Rename RectangleController to SmartNumberController
Modify the code in SmartNumberView and SmartNumberController as shown in the examples (for your NumberRange model).
Expected Application Behavior
The user user should be able to open a SmartNumberView (by running SmartNumberView)
The num variable of SmartNumber should be an editable field on the view
The view should show at least eight 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 (num/number)
Grading
The grader will check the behavior of SmartNumberView 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 #1 - Build MVC on SmartNumber Model Class
Contents
Overview
Concepts
Example 1
Example 2
Challenge
Chapter
Top
Search
TOC