From leavens@cs.iastate.edu Sun Nov 9 16:54:19 2003 Date: Sun, 9 Nov 2003 16:48:44 -0600 (CST) From: Gary T. Leavens To: abitterm@cs.iastate.edu Cc: Staff for Com S 362 Subject: Re: homework 8 part e Hi, On Sun, 9 Nov 2003 abitterm@cs.iastate.edu wrote: > Concerning part 3.e on homework 8, we were wondering if you could clarify > how many SSD's we are to draw-out. Right now it sounds like you want either two > SSD's from the first iteration, or all of the SSD's from the first iteration > plus two more that aren't in the first iteration. Thanks. You should make 2 SSDs. All of this homework is for the first elaboration iteration. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------------------------- From leavens@cs.iastate.edu Sun Nov 9 16:54:33 2003 Date: Sun, 9 Nov 2003 16:49:36 -0600 (CST) From: Gary T. Leavens To: Jeff Groves Cc: Staff for Com S 362 Subject: Re: StartUp & ShutDown Use Cases Hi Jeff, On Sun, 9 Nov 2003, Jeff Groves wrote: > You said that we should include a StartUp use case. Should we include a ShutDown > use case as well, for when the user quits the program? I'm thinking of having it > so that the program automatically saves the cube's state and brings it back up > when they start it up again later. You can do that if you wish, of course. We aren't requiring a ShutDown use case. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------------------------- From leavens@cs.iastate.edu Sun Nov 9 16:54:41 2003 Date: Sun, 9 Nov 2003 16:51:41 -0600 (CST) From: Gary T. Leavens To: Jeff Groves Cc: Staff for Com S 362 Subject: Re: Cube Question #2 Hi Jeff, On Sun, 9 Nov 2003, Jeff Groves wrote: > What should we do about use cases that are combinations of other use cases? If > we have a Create Randomized Cube use case which is a combination of the Create > Default Cube & Randomize Cube use cases, should we make it a separate use case? Yes, but you should make a use case that includes the other two use cases. See Larman's book, section 25.1 (p. 386) for the notation. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------------------------- From leavens@cs.iastate.edu Sun Nov 9 17:09:51 2003 Date: Sun, 9 Nov 2003 17:09:33 -0600 (CST) From: Gary T. Leavens To: Andy McKean Cc: cs362s@cs.iastate.edu Subject: Re: SSD question Hi Andy, On Sun, 9 Nov 2003, Andy McKean wrote: > Just a quick question about proper notation style for System Sequence Diagrams... > > Is it valid to have nested loops in a SSD? In other words, since > repetition is indicated by enclosing a portion of the diagram in a > box and annotating the box (e.g. *[message]), is it valid to enclose > those repeated items within another, larger repeating box? Yes, you can certainly do that. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------ From leavens@cs.iastate.edu Sun Nov 16 19:37:03 2003 Date: Sun, 16 Nov 2003 19:30:16 -0600 (CST) From: Gary T. Leavens To: Jeff Groves Cc: Staff for Com S 362 Subject: Re: Major Change in Project Hi Jeff, On Sun, 16 Nov 2003, Jeff Groves wrote: > We've come up with a working cube that functions well enough for the first > iteration. However, I'm working on a different cube that will probably work > better, but will require some major changes in some aspects of the program. If > we don't plan on implementing this by the first iteration, are we allowed to > implement it by the second one? Or does this fall under the "TOO > LATE!" category? No you can (and it sounds like should), change tht for the second iteration. This is the whole idea of multiple iterations. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ----------------------------------- From leavens@cs.iastate.edu Tue Nov 18 09:05:14 2003 Date: Tue, 18 Nov 2003 09:05:01 -0600 (CST) From: Gary T. Leavens To: Jonna I Jahnke Cc: Staff for Com S 362 Subject: Re: CS 362 Exercise 16 Hi Jonna, On Mon, 17 Nov 2003, Jonna I Jahnke wrote: > I had a question concerning Exercise 16: are we allowed to add getter > functions for the private variables to the HistoricalData class you > provided or am I misunderstanding something about JUnit testing? You shouldn't need to do that. JUnit testing is typically "black-box", which only relies on the public interface of the class under test. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------------------- From leavens@cs.iastate.edu Tue Nov 18 16:42:08 2003 Date: Tue, 18 Nov 2003 16:39:04 -0600 (CST) From: Gary T. Leavens To: Adam Nelson Cc: Staff for Com S 362 Subject: Re: Exercise 16 question Hi Adam, On Tue, 18 Nov 2003, Adam Nelson wrote: > I just tried to run my test for the first time to check a couple of things. I > had multiple things in one test that should have been caught, but it only gave > the first one. In a given test method, only the first failure will be recognized in the JUnit output. The advice given is to have each test method only do one assertion or test, so that you can see them all, if you need to see more than one. > Also, is getting the exception in average after adding a number what is > expected? That's what the (incorrect) code will do when you add just one number, yes. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------------ From leavens@cs.iastate.edu Tue Nov 18 16:42:20 2003 Date: Tue, 18 Nov 2003 16:41:51 -0600 (CST) From: Gary T. Leavens To: Adam Nelson Cc: Staff for Com S 362 Subject: Re: Another exercise 16 question Hi Adam, On Tue, 18 Nov 2003, Adam Nelson wrote: > I just noticed when testing the size part that the mistake in the constructor > cancels out the mistake in the size function, allowing it to run without > errors. Are we supposed to take errors out as the test code finds them in > order to find all of them? No, you aren't supposed to change the code for HistoricalData.java. So it's okay if you can't get all the errors detected. (One could argue that, in this case, perhaps it's not really an error in size at all, but in the other places that use count...) -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------------------------------- From leavens@cs.iastate.edu Tue Dec 2 18:58:21 2003 Date: Tue, 2 Dec 2003 18:57:49 -0600 (CST) From: Gary T. Leavens To: Jeff Groves Cc: Staff for Com S 362 Subject: Re: Problem with JUnit Hi Jeff, On Tue, 2 Dec 2003, Jeff Groves wrote: > I'm trying to use the JUnit test programs, but it isn't working for some reason. > It says "The method assureEquals(int, int) is undefined for the type > Coor3DTest". Neither assureEquals or assureTrue works. I get the feeling it's > something extra we were supposed to do when we made the default JUnit classes, > but has skipped my mind. It's "assertEquals" not "assureEquals". See the JUnit javadocs, which will be automatic in Eclipse. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ----------------------------------- From leavens@cs.iastate.edu Fri Dec 5 17:58:05 2003 Date: Fri, 5 Dec 2003 17:57:10 -0600 (CST) From: Gary T. Leavens To: Adam Nelson Cc: Staff for Com S 362 Subject: Re: JUnit Tests and command line input Hi Adam, On Fri, 5 Dec 2003, Adam Nelson wrote: > We have two classes that get their information from user input on the command > line while the function is running. Is there a way to test those functions in > JUnit? Yes, the easy way is to just have the user do the input during testing. But that's kind of a pain. A better idaea is to rewrite the code slightly to make testing easier, by using the indirection pattern. To do this you could, for example pass the IOStream to be read from to the code that is doing the reading; during normal execution this object would be System.in, but during testing you could make an IOStream that reads from a string buffer (using class java.io.StringReader, for example). Note that you can replace System.in with another InputStream by using System's setIn method (if your program isn't an applet). It is also possible to use an adapter to get the necessary indirection. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ------------------------------------------------------ From leavens@cs.iastate.edu Sat Dec 6 21:18:49 2003 Date: Sat, 6 Dec 2003 21:12:20 -0600 (CST) From: Gary T. Leavens To: abitterm@cs.iastate.edu Cc: Staff for Com S 362 Subject: Re: Homework 9 questions Hi Andrew, On Sat, 6 Dec 2003 abitterm@cs.iastate.edu wrote: > Our group has a few questions on Homework 9 and what all needs to be turned > in. In part b)iv) it says to have 4 fully dressed use cases. We only have 2 for > this iteration, so do we include ones from iteration 1? You should include those from iteration 1 too for this problem. > On part b)v) it says to > write the remaining use cases in casual format. Again, we only have the 2, so > are we to write the use cases from the previous iteration in casual format? If you don't have any more use cases that are left in brief format, just explain that to the TA in a note with the use cases. Don't rewrite a use case that is already in fully dressed format into casual format. > Then on part b)vi) it says to have at least 4 SSDs. Does each and every SSD > count? (Ex: a main success and an alternative for the same case count as 2.) Or > do we count them by the use case? Because then we would only have the 2. You can count all of them. You can do SSD's for alternatives too if you are implementing alternatives. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ----------------------------- From leavens@cs.iastate.edu Sun Dec 7 14:32:55 2003 Date: Sun, 7 Dec 2003 14:32:42 -0600 (CST) From: Gary T. Leavens To: abitterm@cs.iastate.edu Cc: Staff for Com S 362 Subject: Re: Clarifications on HW9 Hi Andrew, On Sun, 7 Dec 2003 abitterm@cs.iastate.edu wrote: > We have a few questions about the instructions for homework 9: > > We were wondering if on the DCD we are to include all of the > listener classes? I think it's okay to leave out all of the GUI layer from these diagrams. Just do the application logic layer. If you also do the GUI layer, you can also omit trivial listeners. > In part d)i) Should we include interaction diagrams from only the second > iteration or do you want them from the first iteration, too? You can just do the second iteration ones (especially if there are enough of them). > In part f. Is there a difference between the javadoc documentation we write in > part i and the JML specifications in part iii? Yes. The javadocs should summarize the intent, any important non-functional properties, and perhaps what the method does in English. The JML should give a formal specification of the (functional) behavior of the method. Note, javdocs start with /** and JML specs start with /*@ . -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ----------------------------- From leavens@cs.iastate.edu Sun Dec 7 17:44:49 2003 Date: Sun, 7 Dec 2003 17:44:09 -0600 (CST) From: Gary T. Leavens To: stodes@iastate.edu Cc: Staff for Com S 362 Subject: Re: CS362 Questions Hi Mike, On Sun, 7 Dec 2003 stodes@iastate.edu wrote: > Professor Leavens, I have a question regarding hw9: > > For the Design Class Diagram, does every variable in the entire program > need to be shown on the diagram? Or should we pick the most representative > variables of each class to display? In theory, all of the fields for each class should be shown, and no local variables in any methods. > The book seems to suggest a Noise-to-Value ratio, that says certain > repetitive things can be left out, if they only clutter up space and do not > give a good idea of how a class works. Yes, that's right; especially if you are writing the design class diagram up at design time, you'd only put in what you think are the important fields in the DCD. Can you be more specific? -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 ---------------------------------- From leavens@cs.iastate.edu Sun Dec 7 19:52:08 2003 Date: Sun, 7 Dec 2003 19:49:57 -0600 (CST) From: Gary T. Leavens To: Jeff Groves Cc: Staff for Com S 362 Subject: Re: Question about JML Hi Jeff, On Sun, 7 Dec 2003, Jeff Groves wrote: > Which is the proper way of writing JML? > > /* > * @ensures blah blah blah; > */ > > /@ > @ ensures blah blah blah; > @/ > > Eclipse doesn't recognize the second one. Neither. You should use /*@ @ ensures ...; @*/ Note that Eclipse will just think it's a comment. You should use the jml checker, the command is jml, to make sure it type checks; or better, use jmlc. See the handout in class for more details, or go to www.jmlspecs.org. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------------- From leavens@cs.iastate.edu Sun Dec 7 23:17:34 2003 Date: Sun, 7 Dec 2003 23:15:25 -0600 (CST) From: Gary T. Leavens To: Jeff Groves Cc: Staff for Com S 362 Subject: Re: Question about JML Hi Jeff, On Sun, 7 Dec 2003, Jeff Groves wrote: > > Neither. You should use > > > > /*@ > > @ ensures ...; > > @*/ > > Would > > /* @ > * @ > * @ > etc. work just as well? That's a bit easier to set up in Eclipse. No, that will just be a Java comment, and everything in it will be ignored by all the JML tools. We'll have to take points off for that. Please do it the way the that is required. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------- From leavens@cs.iastate.edu Mon Dec 8 21:57:19 2003 Date: Mon, 8 Dec 2003 21:55:24 -0600 (CST) From: Gary T. Leavens To: Ivan Rosales Cc: Staff for Com S 362 Subject: Re: bug fixes okay on web for project? Hi Ivan, On Mon, 8 Dec 2003, Ivan Rosales wrote: > Regarding bug fixes. We have not submitted our code in paper form, they > are on the webpage. We would like to update our code to include new bug > fixes, but this may conflict with grading. We are also one small use > case away from completing the project entirely; at least in completing > all of the use cases, there is certainly room for improvement in the > current implementations. > > None of these bugs are fatal and they shouldn't mar the grading of our > project they're just cleanliness issues. > > Are we allowed to update these? Yes, I think you should go ahead and make changes. We'll mostly be grading the source code on big picture issues. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 -------------------------- From leavens@cs.iastate.edu Sat Dec 13 19:24:19 2003 Date: Sat, 13 Dec 2003 19:24:02 -0600 (CST) From: Gary T. Leavens To: Adam N Butcher Cc: Staff for Com S 362 Subject: Re: Presentations Hi Adam, On Sat, 13 Dec 2003 abutcher@cs.iastate.edu wrote: > Will we still be allowed to do a demo in class if we stay within our time limit > and touch on all of the other points required for the presentation? > > I have my own laptop which I could have setup before hand and simply plug into > the projector for a demo. Another option would to just demo straight off the > laptop, but this would be more difficult for the class to see. > > My group has done a lot of work and we are extremely proud of our > accomplishment. We would like to get some sort of credit for our hard work, if > not in points, then at least recognition from our peers. I'd like to avoid use of laptops for demos during the presentations and focus on the designs. Both because I think the demos will take away from a discussion of the design, and because I worry that we won't have enough time to do switches. So I'd rather not see the demo during the presentation times. I think you can talk about what you've done in terms of what the software structure that was needed to accomplish it. That would be really interesting to me and the class, I think. Of course, you should indicate what you did with that structure too, as that's the motivation. But I'd rather that you mostly focus on the design. -- Gary T. Leavens Department of Computer Science, Iowa State University 229 Atanasoff Hall, Ames, Iowa 50011-1041 USA http://www.cs.iastate.edu/~leavens phone: +1-515-294-1580 --------------------------------