- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 1
- Posts with Downvotes
- 1
- Downvoting Members
- 1
[code] The following code lists the nodes in a binary tree in two different orders: preorder:C,B,A,E,D,F,H postorder:A,B,D,H,F,E,C Draw the binary tree. The answer is : C / \ B E / / \ A D F / H so, my question is how should i think or is there any … | |
[code] import javax.swing.*; import java.awt.GridLayout; import java.awt.event.*; import java.text.*; public class TFE extends JFrame implements ActionListener { public TFE() { str txtfNum1,txtfNum2,lblAnswer; setLayout(new GridLayout(3,2,5,5)); add(new JLabel("First Number:")); add(txtfNum1); add(new JTextField(10)); add(new JLabel("Second Number:")); add(txtfNum2); add(new JTextField(10)); add(new JLabel("Total Summation:")); add(lblAnswer); txtfNum1.addActionListener(this); txtfNum2.addActionListener(this); } public void actionPerformed(ActionEvent e) { String str; … | |
[code] import java.util.*; public class course { static Scanner sc=new Scanner(System.in); public static void main(String[]args) { String name,students,addStudent; int numberOfStudents; String courseName,getName,getStudents; int getnumberOfStudents; Course course1=new Course("C++"); Course course2=new Course("Java"); course1.addStudent("Peter"); course1.addStudent("Brian"); course1.addStudent("Anne"); course2.addStudent("Peter"); course1.addStudent("Steve"); System.out.println("Num of student in course1:"+course1.getnumberOfStudents()); String[]students=course1.getStudents(); for (int i = 0; i < course1.getNumberOfStudents(); i++) … | |
[code] this is the simple program that i write import javax.swing.JLabel; import javax.swing.JTextField; import javax.swing.JFrame; import java.awt.FlowLayout; public class ShowFlowLayout extends JFrame { public ShowFlowLayout() { setLayout(new FlowLayout(FlowLayout.LEFT,10,20)); add(new JLabel("firstname")); add(new JTextField(10)); add(new JLabel("MI")); add(new JTextField(10)); add(new JLabel("Lastname")); } public static void main(String[] args) { JFrame frame=new JFrame("ShowFlowLayout"); frame.setSize(400,500); frame.setLocationRelativeTo(null); … | |
[code] import java.util.*; public class course { static Scanner sc=new Scanner(System.in); public static void main(String[]args) { String name,students,addStudent; int numberOfStudents; String courseName,getName,getStudents; int getnumberOfStudents; Course course1=new Course("C++"); Course course2=new Course("Java"); course1.addStudent("Peter"); course1.addStudent("Brian"); course1.addStudent("Anne"); course2.addStudent("Peter"); course1.addStudent("Steve"); System.out.println("Num of student in course1:"+course1.getnumberOfStudents()); String[]students=course1.getStudents(); for (int i = 0; i < course1.getNumberOfStudents(); i++) … | |
[code] import java.util.*; class Salon { static Scanner sc = new Scanner(System.in); public static void main (String[] args) { int skinType,option,maskType,massageType; System.out.println ("\t\t*********************"); System.out.println ("\r Welcome to Sally Salon"); System.out.println ("\r Services available:"); System.out.println ("\r 1.facial and massage"); System.out.println ("\r 2.facial only"); System.out.println ("\r 3.massage only"); System.out.println ("\t\t*********************"); System.out.println ("\t … | |
What is the sequence for inorder, preorder, postorder for ----------------------A--------------------------- ---------------------/--\-------------------------- --------------------B---C------------------------- -------------------/-\--/-\------------------------ ------------------D-E-F------------------------- ----------------/-\-/-\--------------------------- ----------------G-----H-------------------------- Is it correct for Inorder:GDBHEAFC Preorder:ABDGEHCF Postorder:GDHEBFCA if someone out there can help that will be awesome. | |
what is digital fashion?and please provide with example. | |
int *p; int *q; p=new int; *p=35 q=new int; *q=62; p=q; cout<< *p << ","<< *q<< endl; What is the value of `*p` and `*q`? Why? the statement p=q refer to? | |
[code] what is the difference between newNode arrowlink=q q arrowlink=newNode is it the same? [/code] | |
[code] • Constructors of derived class can (directly) initialize only private data members of the derived Data Structures Using C++ 14 class • Execution of derived class’s constructor must trigger execution of one of base class’s constructors • Call to base class’s constructor specified in heading of derived class constructor’s … | |
[code] what is operator overloading n its function.wat is the core purpose we use it by providing me suitable example.i have read about it in book but very confused. hope someone out there can help me.please n thanks you very much. [/code] | |
[code] Computer::Computer() Computer::~Computer() void Computer::setspeed ( int p ) [/code] what is this 3 sentences mean? what is the purpose we use it? i have asked my friend but still a bit blur. pls help.thanks. | |
i am new here,still not familiar with the code.So my Question is i have been given an assignment on how to design a class,pointType , that can store and process a point in the x-y plane. The program should perform setting and printing coordinate of the point, returning the x- … |