Discuss the basic elements of a computer program and how they are put together. (Hint: If you write a paper for class, the elements are words, sentences, paragraphs, and sections, and they are put together in a variety of ways. A program has a similar structure.)
Basic elements of programs:
program is composed of sequence of statements.
The statements are formed with words, operations, numerical values, symbols.
1. words may be Reserved words or keywords and user defined names
Keywords are defined by language designer for specific role . For example if, else, while ,for are keywords used to form control statements.
user defined words are Used to store values required in program while performing computations.
2. Numeric values : integers aand real values can be used.
3. operators: These are symbols or characters used to perform some mathematical operations like addition ,subtraction etc. we use symbols +,-,*,/,%,<,=,> etc.
4. strings: These are sequence of characters formed with letters and digits to store some values like names, user id’s, passwords etc.
5. special symbols: These are used to denote blocks,in expressions, punctuations etc. the symbols are semicolon,colons,commas,braces,parentheses etc.
By using all these 5 basic elements programs are formed.
Discuss the basic elements of a computer program and how they are put together. (Hint: If...
Discuss the basic elements of a computer program and how they are put together. (Hint: If you write a paper for class, the elements are words, sentences, paragraphs, and sections, and they are put together in a variety of ways. A program has a similar structure.) Be sure to read the answers of other students before you respond; and be sure to respond to any comments or questions from the professor. The purpose of a Discussion is to encourage an...
I want to know how to translate the design into a computer program write an interface class java and please put on the comments I would use the eclipse This lab is a stepping stone to project 01. The ADT Bag is a group of items, much like what you might have with a bag of groceries. The ADT Bag should have the following operations. You should use the same operation names that are shown below. • create an empty...
JAVA basic quiz.
1. a) In order to run a java program, the computer must first compile the .java files to create .class files. Then the Java Virtual Machine (JVM) runs the .class files. After compilation, when the JVM first starts to run the program, what is created in memory first? When do instances of an object get created? How long do they stay in memory? Under what circumstances will the JVM delete an object from memory? b)What are the...
Please
explain the answer to (7) using a minimum of 5-7 sentences, written
out in words. YOU DO NOT NEED TO SOLVE CA10D. I only included it as
a reference to what is asked in (7).
7.丌1n your own words, give a clear, logical expla- nation for why the angles in a triangle must al- ways add to 180°. Do not use the "putting angles together" method of Class Activity 10D. 25 10.1 Lines and Angles CA-203 Class Activity 10D...
For this week’s assignment, we will be recreating the Rock, Paper, Scissors program using Object-Oriented Programming. You will be working with me on a team to build the program. I have already written my part of the program, and the Game.java file is attached. Your task will be to write a RockPaperScissors class that contains the following methods: getUserChoice: Has the user choose Rock, Paper, or Scissors. After validating the input, the method returns a String containing the user choice....
Write a C program that computes Pi with the approximation algorithm that I introduced in class. I want you to write the program in two different ways: The first version will add up the first 28284277 elements of the approximation series in a simple for loop. I ask you to put the code into a function with this signature: float get_pi_for(void); The second version will break out of a while loop depending on whether a pair of adjacent elements (remember...
Java CSC252 Programming II Static Methods, Enums, Constants, Random Rock Paper Scissors Write a program that allows the user to play "Rock, Paper, Scissors". Write the RPS class. All code should be in one file. main() will be part of the RPS class, fairly small, and contain only a loop that asks the user if they want to play "Rock, Paper, Scissors". If they say yes, it calls the static method play() of the RPS class. If not, the program...
Write a C++ program that stimulates a questionnaire to find a roommate from your computer class. You will ask the user various questions that might determine a suitable match, at least 5 conditions satisfied from the potential questions. Store the names of students who matches your preference in a file called matchfile. Also, store names of students who are not your preferred match in one-dimensional array called NoMatch, size 21. a. Print the names of students from the matchfile b....
QUESTION 1 How can you implement iteration (such as checking if there are any even elements in a linked list) in a purely functional language, when there's no loop variable concept? O Recursion O Declaring type signatures O Writing out clear, concise comments Find a dragon to help you QUESTION 2 Explain what is happening below. Why are these results looking like this? Describe why it is happening in your own words. >(-10.2 10) 0.1999999999999993 >(-1.2.1) 0.19999999999999996 >(-1.41) 0.3999999999999999 >(-2.2...
In Small Basic Write a program that asks the user how many numbers s/he wishes to enter into an array and then enters a loop and proceeds to get those numbers from the user and enter them into the array. Once the array has been filled with the numbers, your program then asks the user to make a choice indicating what s/he wishes to do with the numbers in the array. The choices are: TextWindow.WriteLine("Enter 1 to compute and display...