Take a moment to review and reflect on the five course outcomes for Advanced Computer Architecture.
Question
Download and read the document and answer all questions in the document. Please see attached document H3 & APA Criteria doc.
Binary Heap Implementation
For this assignment, you will write one implementation of a Priority Queue. For this ADT, removal operations always return the object in the queue of highest priority that has been in the queue the longest. That is, no object of a given priority is ever removed as long as the queue contains one or more object of a higher priority. Within a given priority FIFO order must be preserved.
Your implementation will be:
1. BinaryHeap
The implementation must have identical behavior, and must implement the PriorityQueue interface (provided). The implementation must have two constructors, a default constructor with no arguments that uses the DEFAULT_MAX_CAPACITY constant from
the PriorityQueue interface, and a constructor that takes a single integer parameter that represents the maximum capacity of the priority queue.
The PriorityQueue interface follows:
/* The PriorityQueue ADT may store objects in any order. However,
- ** removal of objects from the PQ must follow specific criteria. The
- ** object of highest priority that has been in the PQ longest must be
- ** the object returned by the remove() method. FIFO return order
- ** must be preserved for objects of identical priority. **
- ** Ranking of objects by priority is determined by the Comparable
- ** interface. All objects inserted into the PQ must implement this ** interface.
*/
package data_structures;
import java.util.Iterator;
public interface PriorityQueue> extends Iterable { public static final int DEFAULT_MAX_CAPACITY = 1000;
// Inserts a new object into the priority queue. Returns true if // the insertion is successful. If the PQ is full, the insertion // is aborted, and the method returns false.
public boolean insert(E object);
// Removes the object of highest priority that has been in the
// PQ the longest, and returns it. Returns null if the PQ is empty. public E remove();
// Deletes all instances of the parameter obj from the PQ if found, and
// returns true. Returns false if no match to the parameter obj is found. public boolean delete(E obj);
// Returns the object of highest priority that has been in the // PQ the longest, but does NOT remove it.
// Returns null if the PQ is empty.
public E peek();
// Returns true if the priority queue contains the specified element // false otherwise.
public boolean contains(E obj);
// Returns the number of objects currently in the PQ. public int size();
// Returns the PQ to an empty state.
public void clear();
// Returns true if the PQ is empty, otherwise false public boolean isEmpty();
// Returns true if the PQ is full, otherwise false. List based // implementations should always return false.
public boolean isFull();
// Returns an iterator of the objects in the PQ, in no particular // order.
public Iterator
}
Thus, your project will consist of the following files. You must use exactly these filenames.
- PriorityQueue.java The ADT interface (provided above)
- BinaryHeapPriorityQueue.java The binary heap implementation.
Additional Details: - Each method must be as efficient as possible. That is, a O(n) is unacceptable if the method could be written with O(log n) complexity. Accordingly, the ordered array implementation must use binary search where possible, such as the contains(), the delete(E obj) method and also to identify the correct insertion point for new additions. For binary heap implementation, both insert() and remove() must be O(log n).
- By convention, a lower number=higher priority. If there are five priorities for a given object, 1 .. 5, then 1 is the highest priority, and 5 the lowest priority.
- You BinaryHeap must be stable – able to determine the oldest entry among those with identical priority.
- You may not make any modifications to the PriorityQueue interface provided.
- You may import java.util.Iterator, and java.util.NoSuchElementException only. If you feel that you need to import anything else, let me know. You are expected to write
all of the code yourself, and you may not use the Java API for any containers. - Your code must not print anything.
- Your code should never crash, but must handle any/all error conditions gracefully. i.e. if the user attempts to call the clear() method on an empty PQ, or remove an item from an empty PQ, the program should not crash. Be sure to follow the specifications for all methods.
- You must write generic code according to the interface provided. You may not add any public methods to the implementations, but you may add private ones, if needed.
I only need the one Binary Heap java file (or code)
Please read question in comment section
DBMS Assignment
Please read attached document
Assignment need to be done by 03/29/2021 1PM EST.
software -2b
Read chapter 4 and reputable resources. Using your knowledge of how an ATM is used, develop a set of requirements that could serve as a basis for understanding an ATM system.
Please list at least one reference.
Lesson learned from safety video
please, I need to watch the safety video than extract and answers these questions below
Also I need to help me and write introduction and conclusion for email to my boss ..
1- What are the Applicable Violated SHEMs in this Video?
2- What are the observed behaviors leading to incidents?
3- Top 2 Lesson Learned.
4- Can similar incident happen at your area and where?
5- Other Highlights by the team
https://www.csb.gov/evergreen-packaging-paper-mill—fire-during-hot-work/
Phonic chips ( computer architecture)
- Why silicon is used in photonics?
- What are four applications of photonics?
- What are integrated – photonics devices?
- Why is silicon not efficient in optical applications?
- What are risks and benefits involved with photonics?
- Discuss the Wavelength-Division multiplexing scheme and the associated new network topology ( crossbar, delta, ring, mesh, torus) for photonics.
response
refer to the attached document.
CONTRUCTION -9
Read chapter 10.
1. Write a Visual Logic program that opens an input file and writes the file data in an array.
2. Calculate the average from the data and display the average.
3. Think about a file exception error. Handle the exception in your program.
Variables, IF/THEN/ELSE, Loops
Instructions:
You will complete this assignment in Python 3.x. Make sure you have downloaded the software and it is installed correctly. You will download it from this site
You will code the following and submit it in one file. Use the information in the Content area for this week to assist you. Save it as a python file (.py), and upload it into the Assignments area.
1. Include comment block on line1 of your code with the following information:
“”
“””
Your Name
Course Name, Section (example: ENTD200 B002 Spr18)
Instructor name
Week #
Date completed
“””
2. Create 2 Python programs based on week 5 Assignment flowcharts and requirements. You must use loops, do not use function calls.
Here is a SAMPLE run for a simple calculator to add to numbers (this is for reference only)
Simple Calculator
What is your name –> Supa
Enter first number –> 7
Enter second number –> 5
Supa, The total of 7.0 + 5.0 = 12.0
Do you want another calculation ? (y/n) y
What is your name –> Lupa
Enter first number –> 21
Enter second number –> 11
Lupa, The total of 21.0 + 11.0 = 32.0
Do you want another calculation ? (y/n) n
Thanks for using my calculator
Assessment Rubric:
A.Create a comment block with the following information:
Your Name
Course Name, Section (example: ENTD200 B002 Spr19)
Instructor name
Week #
Date completed
B. Write a program that will calculate the problem using a loop and stop after the condition has been met.
C. Print (print function with label).
