Some guidelines for this week's studio:
If the font is too small on the wall display, follow these simple :-) instructions:
- In the editor window of a Java file, right-click and choose Preferences
- Near the top of what you next see, click on Text Editors
- Near the bottom of what you next see, click on Colors and Fonts
- Expand Java (not Structured Text Editors!)
- Click Java Editor Text Font
- Click Change
- Pick a juicy font size like 18 or 20 or whatever you like, and OK
- One member of your group should log in, launch eclipse, and open the SVN Repository Exploring perspective:
Window...Open Perspective...Other...SVN Repository Exploring
- Click on the New Repository Location icon (looks like a gold battery with a green plus sign).
- Copy the following URL using your mouse:After pasting:https://shell.cec.wustl.edu:8443/cse132/svn/studio1-ZZZZZZ
- Change ZZZZZZ to the word on your sticker. For example, animal.
- If prompted, type in your WUSTL key and password.
- If the repository is validated, keep going; otherwise get help.
- Right-click on the project name and Check Out the workspace.
- Return to the Java perspective.
- You will take turns using the keyboard but your work will be done in one workspace.
Write a similar Java class PercentModel that works like OpinionModel but allows integers from 0 to 100.
The integer value represents a percentage, whose initial value should be 100 percent.
- You will have to use eclipse to create thie PercentModel as a new Java class in the percent package.
- The class you define should extend DefaultBoundedRangeModel, just as OpinionModel does.
- If you mouse-over the super constructor call in OpinionModel, the Java API should tell you what the parameters mean.
Your PercentModel class must have the following method:
public int computePercentOf(int n)The method takes in n and returns this.getValue() percent of n.
In your group, discuss how to write computePercentOf so that it performs arithmetic using the appropriate types.
Instantiate a couple of sliders hooked to the same model and watch them work in concert.
Show this to a TA and to other groups as needed.
Show this to a TA and to other students as needed.
JButton reset = new JButton("reset"); // ... this.add(reset); // ... reset.addActionListener(this);It's the last line above that will cause eclipse to suggest some things to you. Get help as you need it. There is a description of JButton here, but you only need the bold stuff. You can see how the action events are handled there at least.
- Fill out the feedback.txt file and be sure to commit your workspace.
- Remember the group name you had for today so you can use this for a simple lab exercise Thursday.
When you done with this studio, you must be cleared by the TA to receive credit.
- Commit all your work to your repository
- Fill in the form below with the relevant information
- Have a TA check your work
- The TA should check your work and then fill in his or her name
- Click OK while the TA watches