subject

1. Accept input from a) Standard input (loop for waiting next input after printing the computation result) b) Text file (file name: input. txt with multiple lines of arithmetic expression) 2. The input string is an arithmetic expression including parentheses () and only has one line a) The operator and operand may not have a space character as the separator b) For example, (10.1+200 – 4.5x 5.5)/(2 -3 x5) c) If the input string has syntax error, terminate the program and tell what is wrong. 3. The operand can be an integer or a floating-point value and also negative number. 4. The operators include +, -, x, / and ! (factorial) 5. If the output is not an integer, round to 4 decimal places. a) If using command line or Eclipse console i. Input: (-20-10.1+200 – 4.5x 5.5)/(2 -3 x5) ii. Output: = -11.1654 b) If using a text file (input. txt) as input, you should create an output file (output. txt) i. Input: (-20-10.1+200 – 4.5x 5.5)/(2 -3 x5) ii. In output file: Input: (-20-10.1+200 – 4.5x 5.5)/(2 -3 x5) = -11.1654 iii. There are more than 1 input arithmetic expression in the file.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:00
What is the name of the option in most presentation applications with which you can modify slide elements? 1. the option enables you to modify a slide element in most presentation applications.
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
question
Computers and Technology, 23.06.2019 19:00
This question involves a class named textfile that represents a text file. public class textfile { private string filename; private string filename; private arraylist words; // constructors not shown // postcondition: returns the number of bytes in this file public int filesize() { } // precondition: 0 < = index < words.size() // postcondition: removes numwords words from the words arraylist beginning at // index. public void deletewords(int index, int numwords) { } // precondition: 0 < = index < = words.size() // postcondition: adds elements from newwords array to words arraylist beginning // at index. pub lic voidaddwords(int index, string[] newwords) { } // other methods not shown } complete the filesize() method. the filesize() is computed in bytes. in a text file, each character in each word counts as one byte. in addition, there is a space in between each word in the words arraylist, and each of those spaces also counts as one byte. for example, suppose the words arraylist stores the following words: { mary had a little lamb; its fleece was white as snow. } the filesize() method would compute 4 + 3 + 1 + 6 + 5 + 4 + 6 + 3 + 5 + 2 + 5 as the sum of the lengths of each string in the arraylist. the value returned would be this sum plus 10, because there would also be 10 spaces in between the 11 words. complete the filesize() method below: // postcondition: returns the number of bytes in this file public int filesize() { }
Answers: 1
question
Computers and Technology, 24.06.2019 10:40
Joe needs to see the slide transitions and animations he has applied to his slides in a large view. which presentation view should he use? in which tab would joe find the animations option to make further changes, if any?
Answers: 1
You know the right answer?
1. Accept input from a) Standard input (loop for waiting next input after printing the computation r...
Questions
question
Mathematics, 21.05.2020 06:59
question
Geography, 21.05.2020 06:59
question
German, 21.05.2020 06:59
Questions on the website: 13722362