Explore BrainMass
Share

Computer Science: Interpreter, Complier, and Operators

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

1. What is the difference between an interpreter and a compiler?
2. What are some languages that use an interpreter?
3. What are some languages that use a compiler?
4. What does uncertainty mean?
5. How does uncertainty affect computer programs and databases when it occurs?
6. What is an example of an instance where you had to deal with uncertainty? What were the effects?
7. What are the general stages in the development of an expert system? What occurs in each stage?
8. How is quality measured in an expert system?
9. What kinds of conditional operators are there and how are they used?
10. How might conditional operators play a role in the intensive care unit of a hospital in terms of a speaker notification system?
11. How is knowledge represented in a decision tree?
12. Why don't decision trees work well for planning, scheduling, or synthesis problems?

© BrainMass Inc. brainmass.com October 25, 2018, 12:16 am ad1c9bdddf
https://brainmass.com/computer-science/compiler-theory/computer-sci-theory-222413

Solution Preview

1. The main difference is as followed:
a. Compiler checks syntax of program where as Interpreter checks the keywords of a program.
b. Compiler checks at a time all the program, But interpreter checks simultaneously in the editor.
c. An interpreter provides color coding to the program and helps in self debugging while writing a program.

2. The languages are perl, python and ruby.

3. The languages are C,C++,JAVA,C#

4. Uncertainty means where we cannot predict the exact outcome. in case of uncertainty we either uses probabilistic approach or fuzzy logic. Considering an example of throwing the dice or tossing the coin. If we are assuming our tools I.e. coin or dice is not biased then we cannot predict the exact outcome in any case. What we can do is just predict the probability of particular event like in case of coin the probability of getting head is ½ while in case of dice the probability of getting any no is 1/6.

5. In case of computer program if there is any uncertainty then the program will itself be difficult to design or formalize. Apart from this we even cannot predict the exact output of the program and it will be more difficult to debug. The program may not work accordingly in certain cases if there is some uncertainty involved during design.
In case of database if there is any uncertainty then will be following problems:
1. It will be difficult to store and retrieve the data.
2. It ...

Solution Summary

Various computer science terms are defined and explicated.

$2.19
See Also This Related BrainMass Solution

Understanding how to declare and use variables in computer science homework.

How do you figure out how to declare a variable? How do you know what type of variable to use? What is the best way to name a variable and why? What are the differences between an integer variable and a floating point variable? When and why do data type conversions occur? What is the modulus operator?

Write a short java statement for each question item

1) Declare a variable for each of the data types, pay attention to the naming convention and syntax

a. a int variable representing the number of students, the value of this variable is 45.

b. a double variable representing a student' s GPA.

c. a float variable representing the amount you need to pay for gas at a gas station.

d. a char variable that has the value of C.

e. a String variable containing the name of your pet/hometown/your favorite dish.

2) Write down the result for the following statement.

a. inta=15; float b = 15.0; ?c = a + b;?Question: the data type of c should be ___30___

b. inta=5;?double b = 15.0;?c = a + b;?Question: the value of c is ___20___, the data type of c is ___double____

c. int numOfPeople = 10;?int numOfApple = 4;?c = numOfPeople / numOfApple;?Question: the value of c is __2.5_____, the data type of c should be _______

d. int numOfPeople = 10;?int numOfApple = 4;?c = numOfPeople % numOfApple;?Question: the value of c is _______, the data type of c should be _______

e. int numOfPeople =10;?int numOfApple = 4;?double applePerPerson = 0.0;?applePerPerson = numOfPeople / numOfApple; Question: the value of applePerPerson is ______.

f. int num1 = 5; int num2 = 4; ?int result = num1 % numb2;?Question: the value of result is __________.

g. Let assume you have 1003 cents, using / and % to write a block of java statement to calculate the number of dollars, quarters, and cents you have.
Section Three

Write a block of pseudo code that captures the following federal tax bracket, please note that the following chart is an approximation of the tax bracket, but is not the actual tax bracket:

For people who file single status, Taxable income
0 - $8,500 $8500-$34,500 $34,500 - $83,600 $83,600 - $174,400 $174,400 - $379,150
$379,150 above
tax bracket 10%?15%?25%
28% 33%
35%

View Full Posting Details