100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSE 2221 Actual Exam 2024| Study Questions Solved 100% Correc $13.24   Add to cart

Exam (elaborations)

CSE 2221 Actual Exam 2024| Study Questions Solved 100% Correc

 6 views  0 purchase
  • Course
  • CSE 2221
  • Institution
  • CSE 2221

CSE 2221 Actual Exam 2024| Study Questions Solved 100% Correc

Preview 2 out of 15  pages

  • September 7, 2024
  • 15
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSE 2221
  • CSE 2221
avatar-seller
KenAli
CSE 2221 Actual Exam 2024| Study
Questions Solved 100% Correct

What happens if the precondition is true? - ANSWER If the precondition is true when a
method is called, then the method will run properly and the postcondition will be true when it
returns to the calling program.



What happens if the precondition isn't true? - ANSWER If the precondition isn't true when a
method is called, then the method can do anything (including not terminating which means
the program will be stuck in a sort of infinite loop).



Responsibilities and rewards of the client. - ANSWER The client is responsible for making
sure the precondition is true. Their reward is assuming that the postcondition will be true.



Responsibilities and rewards of the implementer. - ANSWER The implementer is responsible to
make sure that the postcondition is true when the method returns. The implementers reward
is that they may assume the precondition is true when the method is called.



API - ANSWER The documentation that comes from stating pre and post conditions is known
as the API (application programming interface).


Javadoc contracts - ANSWER @param describes the formal parameter
@return describes the returned value

, @requires introduces the precondition
@ensures introduces the postcondition



Trees - ANSWER Each tree is made up of a root node connected to children via branches. Each
child of the root node may act as a root node for its own children.



XML - ANSWER XML is a textual document format used all over the web. XML format is close
to the HTML format with tags and ending tags.



XML Tree to File - ANSWER By looking at the structure of the XML file you are able to create
an XML tree. Any attributes attached to the XML element name will show up in the XML tree.


XML Tree Constructor - ANSWER XMLTree name = new XMLTree1(file name);


Creates XMLTree from the given file name


XML command label (String t = xml.label();) - ANSWER Returns the label of the root of this



XML command isTag (boolean b = xml.isTag();) - ANSWER Returns whether the label of the
root of this is a tag.



XML command hasAttribute(String name) (boolean b = xml.hasAttribute("pubDate");) -
ANSWER Returns whether the root tag of this has an attribute called name.



XML command attribute Value(String Name) (String v = xml.attributeValue("pubDate")); -
ANSWER Returns the value associated with the attribute of the root tag of this called name.



XML command numberOfChildren (int j = xml.numberOfChildren()); - ANSWER Returns the
number of subtrees of the root of this

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller KenAli. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $13.24. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79271 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$13.24
  • (0)
  Add to cart