Đã hoàn thành

Small program in java using double queue( must finish it in one day)

implement and use the ADT Double-Ended Queue. The assignment is divided into two parts. In the first part, you will implement the ADT DQueue with an augmented set of operations using linked representation. In the second part, you will write methods that use this implementation:

1. Given the following specification of the ADT DQueue, implement this data structure using linked representation. You should write the class LinkedDQueue that implements the interface DQueue.

Specification of ADT DQueue

full (boolean flsag): requires: none. input: none. results: if the number of elements in DQ has reached the maximum then ag is set to true otherwise false. output: ag.

addFirst (Type e): requires: DQ is not full. input: e. results: Element e is added to DQ as rst element. output: none.

addLast (Type e): requires: DQ is not full. input: e. results: Element e is added to DQ as last element. output: none.

removeFirst (Type e): requires: DQ is not empty. input: none. results: Removes and returns the rst element of DQ. output: e.

removeLast (Type e): requires: DQ is not empty. input: none. results: Removes and returns the last element of DQ. output:e.

getFirst (Type e): requires: DQ is not empty. input: none. results: Returns the rst element of DQ. output:e.

getLast (Type e): requires: DQ is not empty. input: none. results: Returns the last element of DQ. output: e.

length (int k): requires: none. input: none. results: Returns the number of elements in DQ. output: k.

reverse (): requires: None. input: none. results: Reverse the order of elements in DQ. output: none.

Example 1. If DQ : A; B; C; D; E, then calling [login to view URL]() results in E; D; C; B; A.

2. Write a class called Expr. In this class, you should implement the following static methods:

(a) public static DQueue<Character>[] readExpressions(String fileName): A method that

reads in x mathematical expressions from a le fileName and builds an array of double-ended queues, where each expression is represented by one DQueue of char-acters.

File format: assume that the le fileName consists of a sequence of at most 100 expressions, each one in a separate line and can only contain the following opera-tions: +, -, *, / in addition to the parentheses (, ). For simplicity, assume that the numbers are single digit and unsigned, for instance 5, or 6 but not 23, 124 or -4. An example of in x expression is: 3+(2-1)*7. Assume also that there are no spaces within the expression.

(b) public static int evaluateExpression(DQueue<Character>[] dq, int i): A method that

evaluates the ith expression in dq and returns the calculated value (all operations, "/" in particular, are considered integer operations).

(c) public static boolean reversible(DQueue<Character>[] dq, int i): A method that checks

if the ith expression is reversible then it returns true otherwise it returns false. A reversible expression gives the same value if it is evaluated from right to left or from left to right. For example: (5+3)*2 is reversible, but (5+3)/2 is not reversible.

Kĩ năng: Java, Kiến trúc phần mềm, Màn hình Windows

Xem nhiều hơn: one dimensional array in java, array programs in java with output, java array example code, learn java in one day pdf, java array exercises with solutions, java programming exercises with solutions, write a program that asks the user to type 10 integers of an array, java array programs, rmi program java using access, banking program java using rmi, small project java using swing, bank program java using swing, simple calculate program java using swing event handler, small program java image processing, simple client server program java using xml, small program java rmi, rmi based small program java, atm program java using database, face detection program java using gui, dijkstra program java using heaps

Về Bên Thuê:
( 4 nhận xét ) Riyadh, Saudi Arabia

ID dự án: #16453385

Được trao cho:

$20 USD trong 0 ngày
(26 Đánh Giá)
4.5

11 freelancer đang chào giá trung bình $38 cho công việc này

NovaSofts

Hello Sir/ Ma’am We are a group of Software Engineers having 10+ years of experience. Expert in java, C, C++ , C# , Android. Please check our profile for reference. Thank you

$25 USD trong 1 ngày
(230 Nhận xét)
7.2
liangjongai

I am a full time developer and have greate skills in java, javafx, java swing so I can complete this project. My price and time is negotiable. Let's discuss details via chat. I'll provide best service.

$100 USD trong 1 ngày
(268 Nhận xét)
7.2
usman1493

Hey A Java expert developer is here I have good advanced expertise in java and Javafx This is an initial bid I can write a program for you as per your need Feel free to message me regards

$20 USD trong 0 ngày
(137 Nhận xét)
6.2
mersaad90

Hello sir I can do it.I went carefully through your requests and I think it is ideal for me and my abilities.

$88 USD trong 1 ngày
(17 Nhận xét)
4.4
$25 USD trong 1 ngày
(16 Nhận xét)
4.2
todo2095

السلام عليكم انا مبرجم جافا محترف و سوف اكون سعيدا جدا لمساعدتكم انا متاح الان للعمل لذلك برجاء التواصل للحصول علي اتفاق شكرا لتواصلكم

$30 USD trong 1 ngày
(16 Nhận xét)
3.7
selamiwork

Strong experience in JAVA software programming High ability to identify and implement process improvements Thorough understanding of Object-Oriented software development and formal development methodologies

$25 USD trong 0 ngày
(5 Nhận xét)
3.0
Aramics

A proposal has not yet been provided

$55 USD trong 1 ngày
(2 Nhận xét)
2.7
VnNorthStar

A proposal has not yet been provided

$10 USD trong 2 ngày
(28 Nhận xét)
3.8
$25 USD trong 1 ngày
(0 Nhận xét)
0.0