• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

class invariant ,internal invariant

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all!!!
Presently I was working through some questions on assertions.I came across the words class invariant and internal invariant.What does they mean???
please give me the answer.

this is a question regarding the assertions.Given below are the answers.I was pretty sure that the answers a & b are right.I did not understand answers c and d.Please explain.
a.)With assertions enabled it prints an error message.
b.)With assertions disabled it prints: true,true,false
c.)The combination of the if/else statements and the assert statement indicate that the programmer expects no more than one boolean, b1, b2 or b3, to be true.
d.)The assert statement is being used to check an internal invariant
(code tags added - Barry)
[ May 05, 2004: Message edited by: Barry Gaunt ]
 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Programming With Assertions
Regards,
Anil
reply
    Bookmark Topic Watch Topic
  • New Topic