CS 1102 Discussion 1 of the programming 1 course PDF

Title CS 1102 Discussion 1 of the programming 1 course
Course Programming 1
Institution University of the People
Pages 1
File Size 78.3 KB
File Type PDF
Total Downloads 21
Total Views 136

Summary

This is the first discussion assignment of the programming 1 course known as CS 1102. This discussion forum gave me a final grade of 9.5 when it was graded....


Description

This week’s discussion is a good start for this programing course. In order for me to able to provide a good explanation to this week’s questions, I will first of need to define what a program is and what it does. According to Google dictionary (2021), a program is a series of coded software instructions to control the operation of a computer or other machine. Looking at the definition of a program, we can see that a program consists of some software (instructions and data that tells the computer what to do) that was written (coded), to provide instructions (telling the computer what to do). In order for a computer to be able to understand what the user is trying to make it do, the user needs to speak in a language that a computer can understand. This language is a very strict language that determines what can and can’t be used to communicate with a computer. The rules that govern a programming language are called the syntax of that language. On the other hand, what the programs means or if the program is giving the correct results is called the semantics of the program. A syntax error occurs when one uses an incorrect language to create his or her code. For example, the code if y = 4 system.out.println(“Hello.”) has three syntax errors. -

The command does not end in a semicolon The comparison that occurs after the “if” is not surrounded by parenthesis. The comparison uses the assignment operator “=” rather than the comparison operator “==”

A semantics error occurs when a statement has a valid syntax, but does not work as intended by the programmer. For example, Int i; Void f (int m) { m=t; } This statement will result in a semantic error because “t” is undeclared. References: Eck, D. J. (2019). Introduction to programming using Java, version 8.1. Hobart and William Smith Colleges. http://math.hws.edu/javanotes/ Google Dictionary (2021). Program in Google. Retrieved from https://google.com/search? q=google+dictionary&oq=google+dictiona&aqs=chrome.035i39j69i57j0j0i433j016.9210j0j9&s ourceid=chrome&ie=UTF-8#dobs=program...


Similar Free PDFs