Questions
Tree Reconstruction - Pre+In => Post (C++) Give you pre-order traversal and in-order traversal, please output...

  • Tree Reconstruction - Pre+In => Post (C++)

Give you pre-order traversal and in-order traversal, please output post-order traversal.

Input

Two lines. Pre-order traversal and in-order traversal.

Output

Post-order traversal.

Sample Input

GDAFEMHZ

ADEFGHMZ

Sample Output

AEFDHZMG

In: Computer Science

Assume that the population of Mexico is 128 million and that the population increases 1.01 percent...

Assume that the population of Mexico is 128 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 323 million and that the population is reduced 0.15 percent annually. Write an application that displays the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took. Save the file as Population.java.

In: Computer Science

5NCCA: Many believe that cloud computing can reduce the total cost of computing and enhance “green...

5NCCA:

Many believe that cloud computing can reduce the total cost of computing and enhance “green computing” (environmental friendly). Why do you believe this to be correct? If you disagree, please explain why?

In: Computer Science

I am using the program Python. Assume a function called count_primes is pre-definied. If consumes two...

I am using the program Python.

Assume a function called count_primes is pre-definied. If consumes two int arguments start and stop that returns the number of prime integers between start (inclusive) and stop (exclusive).

Note: The start value must be less than or equal to the stop value.

Enter 3 assertEqual statements to test the count_primes function.

In: Computer Science

Design and implement a program to allow a college administrator to register new students and add...

Design and implement a program to allow a college administrator to register new students and
add courses to the existing one. In addition, your program should allow the administrator to do
the following:
• Add/Remove a new student
• Add/Remove a course to/from a selected student
• Search for a student either by last name or by id.
• Search for a course either by name or by id.
• Display a selected student along with the courses s/he is registered for.
• List all registered students along with the courses each student is registered for.

Using java

In: Computer Science

Python program please no def, main, functions Given a list of negative integers, write a Python...

Python program

please no def, main, functions

Given a list of negative integers, write a Python program to display each integer in the list that is evenly divisible by either 5 or 7. Also, print how many of those integers were found.

Sample input/output:

Enter a negative integer (0 or positive to end): 5
Number of integers evenly divisible by either 5 or 7: 0

Sample input/output:

Enter a negative integer (0 or positive to end): -5
-5 is evenly divisible by either 5 or 7.
Enter a negative integer (0 or positive to end): -35
-35 is evenly divisible by either 5 or 7.
Enter a negative integer (0 or positive to end): -3
Enter a negative integer (0 or positive to end): -7
-7 is evenly divisible by either 5 or 7.
Enter a negative integer (0 or positive to end): 0
Number of integers evenly divisible by either 5 or 7: 3

In: Computer Science

a.Draw the block diagram of a 4-bit ripple carry adder using full adders. Use the black...

a.Draw the block diagram of a 4-bit ripple carry adder using full adders. Use the black box of the full adder in question 1.

b.Draw the block diagram of a 4-bit adder/subtractor circuit. The circuit should have an input (add/sub) that determines the operation (0: add, 1: subtract)

In: Computer Science

Explain recurrence including the explanation of Merge-sort and recursion tree. Then provide one example of pros...

Explain recurrence including the explanation of Merge-sort and recursion tree. Then provide one example of pros and cons.

In: Computer Science

Create a Java Program/Class named MonthNames that will display the Month names using an array. 1....

Create a Java Program/Class named MonthNames that will display the Month names using an array.

1. Create an array of string named MONTHS and assign it the values "January" through "December". All 12 months need to be in the array with the first element being "January", then "February", etc.

2. Using a loop, prompt me to enter an int variable of 1-12 to display the Month of the Year. Once you have the value, the program needs to adjust the given input to align with the array index and then confirm that the variable is in the range of 0-11. If it is not, display "Invalid Entry". If it is in range, display the string the matches the given entry. Then prompt to continue.

Tip:For the String input for the Prompt to Continue - it is preferable to use .next() instead of .nextLine(). Otherwise you will run into the Scanner Bug described in Section 3.10.

3. Display "Done" after the loop processing has ended.

Enter the Month of the Year: 1

The month name is January

Try again (Y/N): Y

Enter the Month of the Year : 2

The Month name is February.

Try again (Y/N): Y

Enter the Month of the Year : 55

Invalid Entry

Try again (Y/N): N

You can copy the code below to seed your array.:

{"January","February","March","April","May","June","July","August","September","October","November","December"};

In: Computer Science

Decide which one of the following statements is an example of Inductive OR Deductivereasoning: It is...

  1. Decide which one of the following statements is an example of Inductive OR Deductivereasoning:
  1. It is dangerous to drive on icy streets. The streets are icy now, so it is dangerous to drive now.
  2. Elephants have cells in their bodies and all cells have DNA, so elephants haveDNA.
  3. All birds have feathers and robins are birds, so robins have feathers.
  4. Red meat has iron in it and beef is red meat, so beef has iron in it.
  5. John is an excellent swimmer. John’s family has a swimming pool. John’s sister Mary must also be an excellent swimmer.
  6. Ray is a football player. All football players weigh more than 170 pounds. Ray weighs more than 170 pounds.

In: Computer Science

The project description: As a programmer, you have been asked to write a Java application, using...

The project description: As a programmer, you have been asked to write a Java application, using OOP concepts, for a Hospital with the following requirements: • The Hospital has several employees and each one of them has an ID (int), name (string), address (string), mobile phone number (string), email (string) and salary (double) with suitable data types. • The employees are divided into: o Administration staff: who have in addition to the previous information their position (string). o Doctor: who have also a rank (string) and specialty (string). The project requirements: • You will need to create all the needed Java classes with all the required information. • You have to apply all the OOP (Object Oriented Programming) concepts that we have covered in this module (i.e. inheritance, polymorphism, interface and collections) • Include a Microsoft Word document (name it as readme.doc) that includes several screenshots of your Netbeans IDE application GUI interface as well as the output screenshot results. Provide all assumptions that you have made during design and implementation. • Include the whole Netbeans Java project with all source codes. Write as much comments as possible to document your source codes. At the end, you will need to create a testing class (e.g. Hospital.java) with the static main() method with the following requirements: • It must have initial fixed collections of working staff (at least 3 administration staffs and 2 doctors) • The program will print a selection screen where the user can choose the operation he/she wants to perform. The selection screen will be repeated after each selection until the staff type the number 4 to completely exit from the program: 1. Add an administration staff (by providing all her/his information) to the list of all administration staff 2. Add a doctor (by providing all her/his information) to the list of all doctors 3. Print all working staff (remember to differentiate between administration staff and doctors in the output printout 4. Exit the program

In: Computer Science

Your first project is to build your own home page. The page should be some sort...

Your first project is to build your own home page. The page should be some sort of introduction to you, and include more than a single page.

Other than that, there are no rigid guidelines as to what these pages should contain.

If you're looking for ideas of what to put into your personal pages, here are some starters:

  • Information about you
  • Information about your occupation and your job
  • Friends and Family
  • Pets
  • Spouse/SO/Partner
  • Your most recent vacation
  • Favorite TV shows (Tip: Link to the show's/movie's site or to its page on imdb.com
  • Where and with whom you live
  • What you do with your spare time (if you have any)
  • Any organizations to which you belong or sponsor
  • You can include some opinions or articles you may have written.

These are just ideas, though. What you put on your home site is entirely up to you.

You might want to consider your audience a specific group, such as classmates and the instructor--in which case you might want to include information such why you're taking this class, what kind of computer and 'net connection you're using, etc. Or, you may want to make your audience anyone who might be interested in or you know

In: Computer Science

Write code that classifies a given amount of money (which you store in a variable named...

Write code that classifies a given amount of money (which you store in a variable named amount), specified in cents, as greater monetary units. Your code lists the monetary equivalent in dollars (100 ct), quarters (25 ct), dimes (10 ct), nickels (5 ct), and pennies (1 ct). Your program should report the maximum number of dollars that fit in the amount, then the maximum number of quarters that fit in the remainder after you subtract the dollars, then the maximum number of dimes that fit in the remainder after you subtract the dollars and quarters, and so on for nickels and pennies. The result is that you express the amount as the minimum number of coins needed. Please show me how to do it in the jupyter notebook.

In: Computer Science

Discuss how to implement an isolated test lab environment to test DHCP split scope, failover scope,...

Discuss how to implement an isolated test lab environment to test DHCP split scope, failover scope, and security configurations.

In: Computer Science

List four alternate terms for "physical address". Name the TCP/IP model layers, and map them to...

  1. List four alternate terms for "physical address".
  1. Name the TCP/IP model layers, and map them to the corresponding OSI model

layers.

  1. At which TCP/IP model layer(s) do UDP and TCP reside?
  1. List five TCP/IP model application layer protocols.
  1. You are converting your network to an IP addressing scheme. You assign a junior administrator the task of assigning addresses to your network hosts from the IP address range 202.17.68.0-202.17.68.255. He states that he used every one of the 256 addresses in the range. Which devices on the network will be unable to communicate with other network devices?

In: Computer Science