Question: Please further expand the function you implemented in (2) to allow the printing of the number of each unique leaf part in a sub-parts-structure tree
Please further expand the function you implemented in (2) to allow the printing of the number of each unique leaf part in a sub-parts-structure tree as the example shown below:.... This question is not answered. I need this answer.
I need answer for 3 and 4 questions.
1. Create a 'Part_Structure' table as follows (key attributes are underlined): (5 points) Part_Structure Table: 2. Write a Java program (use JDBC to connect to the database) that implements the following function (written in pseudo code) that prints out the subparts of a part using a depth-first search, and the branch with a smaller part number will be searched first (where there is more than branch): (20 points) CALL RECURSION ( GIVENP\# ) ; RECURSION: PROC (UPPER_P\# ) RECURSIVE ; DCL UPPER_P\# ... ; DCL LOWER_P\# ... INITIAL (' ' ); EXEC SQL DECLARE C CURSOR FOR SELECT MINOR_P\# FROM PART_STRUCTURE WHERE MAJR_P\# = :UPPER_P\# AND MINOR_P\# > :LOWER_P\# ORDER BY MINOR_P\#; print UPPER_P\#; DO "forever"; EXEC SQL OPEN C ; EXEC SQL FETCH C INTO :LOWER_P\# ; EXEC SQL CLOSE C ; IF no "lower P\#" retrieved THEN RETURN ; END IF ; IF "lower P\#" retrieved THEN CALL RECURSION ( LOWER_P\#) ; END IF ; END DO ; END PROC ; Given the value of the input parameter ' P1 ', it should print out the following sequence (in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
