Question
Please assist with code in c# or java line 13 is stack public Stack=new Stack(); public string[] openingtags; public string [] closingtags; public String checkHTMLDocument(ArrayList
Please assist with code in c# or java
line 13 is stack
public Stack=new Stack(); public string[] openingtags; public string [] closingtags;
public String checkHTMLDocument(ArrayList Tags) in class HTML. /* In the hypertext markup language (HTML), tags exist in both opening * and closing forms (refer to the examples in the question paper). * For an HTML document to be correctly formatted, the nested opening * and closing forms of the tags must be properly balanced. * * pre: Have list of tags (Tags) extracted from an HTML document recorded * in sequence of occurrence in HTML document. The list may be empty. * Each tag in list Tags is a string. List Tags has only values occurring * in arrays openingTags or closingTags (see lines 15 and 16). * post: Making use of ONLY the data structure implemented in line 13, * process list Tags to determine whether the HTML document represented * by the list is correctly formatted or not. * For a correctly formatted document return the value SUCCESS. * For an incorrectly formatted document, return the value FAIL. */ {
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started