A tree has 5 edges,how many nodes are in this path


Problem:

Question 1: If a path in a tree has 5 edges,how many nodes are in this path?

Question 2: Create a public class that only has the main function. Add, in the same file, a default class that will be used to define data. This class will be called Person and will have two data members. One is String type and it will be for the name. The other will be int type and will be for age. Create two get methods (for name and age, separately), a set method to change both name and age, and a display method to show the details. In the display method, use JOptionPane. You can code in the input data instead of asking the user to enter it when the program is running. Also, define a constructor that will serve the same purpose as the set method.

Please show your work.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: A tree has 5 edges,how many nodes are in this path
Reference No:- TGS0891382

Expected delivery within 24 Hours