Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ What topics are contained in the contracts?

Answered: 1 week ago

Question

=+Are they specific or general in nature?

Answered: 1 week ago