All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
concepts of programming languages
Questions and Answers of
Concepts of Programming Languages
Prove that the following grammar is ambiguous:→→ + |→ a | b | c
Consider the following grammar:→ a b→ b | b→ a | aWhich of the following sentences are in the language generated by this grammar?a. baabb. bbbabc. bbaaaaaSd. bbaab
Suppose someone designed a stack abstract data type in which the function top returned an access path (or pointer) rather than returning a copy of the top element. This is not a true data
What are the primary problems with using semaphores to provide synchronization?
What are the two primary design issues for language support for concurrency?
Write Programming Exercise 6 using Ada.Data From Exercise 6:The reader-writer problem can be stated as follows: A shared memory location can be concurrently read by any number of tasks, but when a
Are all Ruby subclasses subtypes?
What access controls does Ruby support for methods?
What access controls does Ruby support for instance variables?
How are getter methods defined in a Ruby class?
How does Ruby implement primitive types, such as those for integer and floating-point data?
How are instances of C++ template classes created?
What are the advantages and disadvantages of the ability to change objects in Ruby?
What is the origin of the syntax of method calls in Objective-C?
Describe the three ways a client can reference a name from a namespace in C++.
In a letter to the editor of CACM, Rubin (1987) uses the following code segment as evidence that the readability of some code with gotos is better than the equivalent code without gotos. This code
What causes a C++ template function to be instantiated?
Show the stack with all activation record instances, including static and dynamic chains, when execution reaches position 1 in the following skeletal program. Assume bigsub is at level 1. function
If a compiler uses the static chain approach to implementing blocks, which of the entries in the activation records for subprograms are needed in the activation records for blocks?
Write an analysis of the similarities of and differences between Java packages and C++ namespaces.
What are the language design requirements for a language that supports abstract data types?
Discuss the advantages of C# properties, relative to writing accessor methods in C++ or Java.
Write an abstract data type for complex numbers, including operations for addition, subtraction, multiplication, division, extraction of each of the parts of a complex number, and construction of a
What are the language design issues for abstract data types?
Explain the dangers of C’s approach to encapsulation.
Write an abstract data type for queues whose elements store 10-haracter names. The queue elements must be dynamically allocated from the heap. Queue operations are enqueue, dequeue, and empty. Use
From where are C++ objects allocated?
Write an abstract data type for a queue whose elements can be any primitive type. Use Java 5.0, C# 2005, or C++.
In what different places can the definition of a C++ member function appear?
What are the advantages and disadvantages of the Objective-C approach to syntactically distinguishing class methods from instance methods?
In what ways are the method calls in C++ more or less readable than those of Objective-C?
Write an abstract data type for a queue whose elements include both a 20-character string and an integer priority. This queue must have the following methods: enqueue, which takes a string and an
What is the purpose of a C++ constructor?
What are the arguments for and against the Objective-C design that method access cannot be restricted?
A deque is a double-ended queue, with operations adding and removing elements from either end. Modify the solution to Programming Exercise 7 to implement a deque.Data From Exercise 7:Write an
What are the legal return types of a constructor?
Why are destructors rarely used in Java but essential in C++?
Write an abstract data type for rational numbers (a numerator and a denominator). Include a constructor and methods for getting the numerator, getting the denominator, addition, subtraction,
Where are all Java methods defined?
What are the arguments for and against the C++ policy on inlining of methods?
How are C++ class instances created?
Describe a situation where a C# struct is preferable to a C# class.
How are the interface and implementation sections of an Objective-C class specified?
Explain why naming encapsulations are important for developing large programs.
Are Objective-C classes types?
What is the access level of Objective-C methods?
The namespace of the C# standard library, System, is not implicitly available to C# programs. Do you think this is a good idea? Defend your answer.
When are constructors implicitly called in Objective-C?
Compare Java’s packages with Ruby’s modules.
Why are properties better than specifying an instance variable to be public?
From where are Java class instances allocated?
Why does Java not have destructors?
Where are all Java methods defined?
Where are Java classes allocated?
Why are destructors not as frequently needed in Java as they are in C++?
What is a friend function? What is a friend class?
What is one reason Java does not have friend functions or friend classes?
Describe the fundamental differences between C# structs and its classes.
How is a struct object in C# created?
Explain the three reasons accessors to private types are better than making the types public.
What are the differences between a C++ struct and a C# struct?
What is the name of all Ruby constructors?
What is the fundamental difference between the classes of Ruby and those of C++ and Java?
Describe the two problems that appear in the construction of large programs that led to the development of encapsulation constructs.
What problems can occur using C to define abstract data types?
What is a C++ namespace, and what is its purpose?
What is a Java package, and what is its purpose?
Describe a .NET assembly.
What elements can appear in a Ruby module?
Describe the three characteristic features of object-oriented languages.
What important part of support for object-oriented programming is missing in SIMULA 67?
What is the difference between a class variable and an instance variable?
Repeat Programming Exercise 1 using Ruby.Data From Exercise 1:Rewrite the single_linked_list, stack_2, and queue_2 classes in Section 12.5.2 in Java and compare the result with the C++ version in
Explain the principle of substitution.
What is multiple inheritance?
Repeat Programming Exercise 1 using Objective-C.Data From Exercise 1:Rewrite the single_linked_list, stack_2, and queue_2 classes in Section 12.5.2 in Java and compare the result with the C++ version
Explain the ways subclasses can be created that are not subtypes.
What is a polymorphic variable?
Design and implement a C++ program that defines a base class A, which has a subclass B, which itself has a subclass C. The A class must implement a method, which is overridden in both B and C. You
Compare the dynamic binding of C++ and Java.
What is an overriding method?
Write a program in C++ that calls both a dynamically bound method and a statically bound method a large number of times, timing the calls to both of the two. Compare the timing results and compute
Compare the class entity access controls of C++ and Java.
Describe a situation where dynamic binding is a great advantage over static binding.
Repeat Programming Exercise 4 using Java, forcing static binding with final.Data From Exercise 4:Design and implement a C++ program that defines a base class A, which has a subclass B, which itself
Compare the multiple inheritance of C++ with that provided by interfaces in Java.
What is a virtual method?
What is one programming situation where multiple inheritance has a significant advantage over interfaces?
What is an abstract method? What is an abstract class?
Explain the two problems with abstract data types that are ameliorated by inheritance.
Describe briefly the seven design issues used in this chapter for object-oriented languages.
Describe the categories of changes that a subclass can make to its parent class.
What is a nesting class?
Explain one disadvantage of inheritance.
What is the message protocol of an object?
Explain the advantages and disadvantages of having all values in a language be objects.
From where are Smalltalk objects allocated?
What exactly does it mean for a subclass to have an is a relationship with its parent class?
Describe the issue of how closely the parameters of an overriding method must match those of the method it overrides.
Explain how Smalltalk messages are bound to methods. When does this take place?
Showing 1 - 100
of 965
1
2
3
4
5
6
7
8
9
10