It's UWAweek 47

help5501

This forum is provided to promote discussion amongst students enrolled in CITS5501 Software Testing and Quality Assurance. If posting a question, it's suggested you check first whether your question is answered in the unit Frequently Asked Questions (FAQ) list, and use the search box (on the right) to see if an answer to your question has already been posted.

Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.

Note that any posts must comply with the UWA Code of Conduct and the UWA Academic Conduct Policy. That means you should (a) treat everyone with respect and courtesy, and (b) not post your solutions to an assessment that's in progress.

If asking a programming question, it's recommended you read How do I ask a good question? If reporting or troubleshooting a bug in software used in the unit, it's recommend you read How to report bugs effectively.
Displaying the 4 articles in this topic
Showing 4 of 135 articles.
Currently 20 other people reading this forum.


 UWA week 37 (2nd semester, week 7) ↓
SVG not supported

Login to reply

👍?
helpful
10:33am Thu 12th Sep, Xia C.

In Lab 6 Part 2, for question c (G∨(m≥a)∨(H∧U)), to make the clause G active, we need both (m≥a) and (H∧U) to be false. However, if m=a=0, then (m≥a) will be true, and regardless of whether G is true or false, the overall result will be true, preventing the achievement of Restricted Active Clause Coverage.



This article has 1 attachment:

 

SVG not supported

Login to reply

👍?
helpful
3:18pm Fri 13th Sep, Arran S.

Hi Xia,

You're correct. The expression should actually contain the clause m>a, not m≥a. Then the assignment "m=a=0" will result in m>a evaluating to false, which is what is required. I'll correct that on the lab sheet shortly.

Thanks!

Arran

"Xia Cheng" [email protected] wrote:

In Lab 6 Part 2, for question c (G∨(m≥a)∨(H∧U)), to make the clause G active, we need both (m≥a) and (H∧U) to be false. However, if m=a=0, then (m≥a) will be true, and regardless of whether G is true or false, the overall result will be true, preventing the achievement of Restricted Active Clause Coverage.


SVG not supported

Login to reply

👍?
helpful
8:10pm Fri 13th Sep, ANONYMOUS

Another minor update to a labsheet I thought I'll mention, lab 4 at the bottom it has an example function:

" public setMinutes(int minutes) { this.minutes = minutes; } "

I believe the method signature should be: "void setMinutes(int minutes)"


 UWA week 38 (2nd semester, week 8) ↓
SVG not supported

Login to reply

👍?
helpful
4:16pm Mon 16th Sep, Arran S.

Hi,

Thanks for pointing that out! You are correct - the method needs a return type, which should be void in this case. I'll add that.

It might be worth pointing out that documentation testing, which was mentioned in lectures, is a good way of avoiding problems like these, and it is used for the code in some labs (including lab 4, although not for the code fragment you pointed out).

Several of the code samples in the lab worksheet get automatically extracted and checked to make sure they compile – the source I use for the lab sheet contains Python code like the following to run tests:

from subprocess import run
try:
  run(["javac", "CollapseClass.java"], check=True)
except Exception as ex:
  print("\n\n***JAVAC FAILED: ", ex, "***", sep="");

However, the test code does add extra complexity, and developers need to remember to add it for all code snippets. In this case, setMinutes is a small fragment that I added to the solutions this year, and it doesn't include surrounding test code.

Cheers,

Arran

Another minor update to a labsheet I thought I'll mention, lab 4 at the bottom it has an example function:

" public setMinutes(int minutes) { this.minutes = minutes; } "

I believe the method signature should be: "void setMinutes(int minutes)"

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy