Programming Language Concepts The following article deals with questions/answers you may encounter when asked about Lexical and Syntax Analysis. Check the bottom of the page for links to the other questions and answers I’ve come up with to make you a great Computer Scientist (when it comes to Programming Languages). 324. What are the 3 approaches to implementing programming languages? – Compilation, Pure Interpretation and Hybrid Implementation 325. What is the job of the syntax analyzer? – Check the syntax of the program and create a parse tree. 326. What are the syntax analyzers based on? – Formal description of
Author: Dino Cajic
Programming Language Concepts In this segment, we’ll cover a few common topics that you should know as a Computer Scientist that pertain towards Objective C, Java, Perl, JavaScript, PHP, Python, Ruby, Lua, C#, general language syntax, and language semantics. 201. Who developed Objective-C? – Brand Cox and Tom Love 202. True or False? Objective-C was used to write MAC OS X. – True 203. True or False? Objective-C is a strict superset of C – True 204. True or False? Objective-C is a hybrid language with imperative and object-oriented features. – True 205. Who developed Java? – James Gosling 206.
Programming Language Concepts You can see the first part of the PLC question and answer series here. In this post, we’ll still be focusing on the earlier days of language development. Some topics inside of this set include Lisp, ALGOL, COBOL, BASIC, PL/I, APL, SNOBOL, SIMULA, Prolog, Ada, and C. Before going through, can you answer this question? All modern languages owe some of their design to _____ or ______. 105. Who developed Lisp? – John McCarthy 106. What type of language is Lisp? – Functional programming language 107. True or False? Lisp is purely functional. – True 108. What are
Programming Language Concepts One of the easiest methods that I use to learn new topics is by creating notes on the subject and then turning those notes into questions and answers. Remembering answers to questions just seems more natural. I was able to memorize these 104 questions and answers in less than a few hours. I wanted to start doing this for some topics that I find pretty interesting. To begin, here are some questions and answers to Programming Language Concepts (PLC). I’m reading your mind right now and the answer is yes, there will be more. 1. Name 3 reasons
Constructing the Java Data Structure Certain data structures in Java can be created by you (yes you). In this example, we’ll go ahead and create an ArrayList data structure that has some of the methods that the built-in ArrayList class has. We’ll create 2 constructors: The default constructor that creates an ArrayList with a default size of 10. Constructor that allows an initial size to be passed to the array. We’ll also create a number of methods: void add(Object x); A method that allows you to place an Object at the end of the ArrayList. void add(int index, Object x); A method that allows
Java’s Data Structure Illustrated One way to get exposure to a specific data structure is to simply read the documentation. But it won’t sink in thoroughly until you create your own example. In this article, we’ll look at the LinkedList class. The phone directory seems to be the example of choice by most college professors to introduce this data structure. Within our phone directory program, we’ll want to be able to: add a new record, delete the current record, change the first name of the current record, change the last name of the current record, change the phone number of the current record,
Solving Anagrams Step by Step I was briefly looking through some sample Computer Science course questions and came upon one that stated: Create an anagram program in Java that reads a text file and computes the anagrams of the words. If the words are anagrams of each other, put them on the same line; if they’re not, print each one on a new line. The anagram program should create a new text file. The only data structure that you can use is an array. You must create your own sorting algorithms. This was my solution to it. Make sure to
When to ‘break’ and When to ‘continue’ There are a couple of ways to interrupt a loop: we’ll explore break and continue. break In the following example, a loop-continuation-condition is set to test if the number is less than 20. If true, the number variable will increment by one and the current value of the variable number will be added to the total as is defined by the variable sum. So if we let the following loop continue without any sort of interruption, the number will be 20 and the sum will be 210. However, adding the keyword break after the test is performed within the while loop will cause the loop to
A Step-by-Step Guide to Constructing Bubble Sort The Bubble Sort algorithm sorts an array of items in increasing order. It steps through the array and compares the adjacent elements. If they are not sorted, it swaps them. It then keeps repeating the procedure until the array is fully sorted. Let’s jump into an example. The following elements are compared during the first iteration: 0 and 1, 1 and 2, 2 and 3, 3 and 4, and 4 and 5. In the first comparison of the first iteration, elements at indices 0 and 1 are compared. Since 3 is less than
Why Cybersecurity is a Business Concern It seems like every day now, we hear about a new hack. But the problem is not just technology. It’s also a business problem that everyone needs to understand and address. And it affects every business in some way or another. I personally believe it’s because of the word itself, cybersecurity. It sounds technical, it involves technology, so it must be 100% an IT issue to fix. Let’s walk through a quick scenario and see who fits into each point: Finance: sets up a login for their bank account. IT: provides security awareness training
