Discussion Assignment 8
Advantages of OOP
Object-Oriented Programming has the following advantages over conventional approaches:
OOP provides a clear modular structure for programs which makes it good for defining abstract
datatypes where implementation d
Discussion Assignment 7
A standard template library uses templates to achieve the required results, and provides compile
time polymorphism. STLs also include components such as functors, iterators and algorithm
An STL includes sequence and ass
Discussion Assignment 6
A recursive function is a function that contains a call to itself. A recursive struct is a struct that
contains an instance of itself. You can combine the two as a recursive class. The key part of a
recursive item is that it contai
Discussion Assignment 5
The main limitation of arrays is that they cannot really be dynamically extended or shrunk, so
you can use an array only if you can set your stack or queue with a maximum upper limit. A
linked list does not have such a restriction
Discussion Assignment 4
Polymorphism is a long word for a very simple concept.
Polymorphism describes a pattern in object oriented programming in which classes have
different functionality while sharing a common interface.
The beauty of polymorphism is th
Discussion Assignment 1
Operator overloading allows the programmer to define how operators (such as +, -, =, =, and !)
should interact with various data types. In other words, The purpose of operator overloading is to
make programs clearer by using conven
Discussion Assignment 2
The follow is from www.gamasutra.com and sums up what class has to do with OOP:
While class is certainly important to have in real life, it is equally important to
have while programming. Taking advantage of an Object Oriented Prog
Discussion Assignment 3
The mechanism of exceptions is not always used to signal errors. Exceptions are thrown in out of
the ordinary situations that require a separate code path to process, including errors. For
example, a user providing a name of a file
Arrays contain a specific number of elements of a particular type. So that the compiler can
reserve the required amount of space when the program is compiled, you must specify the type
and number of elements that the array will contain when i
Since no one creates the perfect code (or program) the first time around, formatting and
commenting code play an important role in the maintenance of software. Changes to the code
after it was write will be a pain if original programmer isnt
While there are a few ways to help a programmer write code, all have their strengths and
weakness. For example, pseudocode is easy to maintain and develop. The disadvantage, however
is that it can be impossible to understand or analyze if not
What are some of the steps you should take before starting any programming assignment?
Well, some of the first steps should be listing what you want the program to do. This can be done
by many means. Two of which are pseudocode and flowcharti
Discuss the importance of testing your programs well. It cant be stressed enough always to test
any program that you write. One simple mistake can mean the difference between a career and
the unemployment line. It is simply not making a mista
The purpose of the language of C was to allow a faster, less tedious way to program computers.
Also, it is easier to understand than machine language. It includes high- and low-level language
features. C+ was created for the purpose of offeri
Unit testing is a type of testing to check if the small piece of code is doing what it is suppose to do.
Unit testing checks a single component of an application.
The scope of Unit testing is narrow, it covers the Unit or small p
A type of programming in which programmers define not only the data type of a data structure,
but also the types of operations (functions) that can be applied to the data structure. In this way,
the data structure becomes an object that inclu
Classes are used to create user defined types. An instance of a class is called an object and
programs can contain any number of classes. As with other types, object types are case-sensitive.
Classes provide encapsulation as defined in the Ob
Systems testing is often performed against the whole platform, and treats the environment as
a black box. System integration testing however, acts upon a subset of the whole system, and
may mock other platforms, interact with databases, netwo
Regression tests are performed whenever anything has been changed in the system in order to
check that no new bugs have been introduced.
This means you re-run your unit and integration tests after all patches, upgrades, and
Discussion 3: Testing of software is also a big part of programming. You will find programmers
who do not like testing. But testing is a very important part of the software development process.
How else would you know if what you wrote is correct? Some st
The text defines a pointer as a special variable that is used to hold a memory address. It makes
coding huge amounts of data and passing it much easier. You can also request more memory this
way and get back to it. This function is called Dyn
The requirements come from the limits of the programming language and person that wants
the program. Basic questions include: What is it that you want the program to do? How
detailed do you want the input and output to be? And finally how eas
Display What is the rooms width?
Display What is the rooms length?
area = width x length
Declare an interger variable Width;
Declare an interger variable length;
Declare an interger variable are
Week1 Assignment 2
1. The CPU is the brain of the computer and is the most essential part of the computer. It works on
the instructions provided to it. It performs arithmetic and logical operations on the data. The
CPU contains the control unit,
Week1 Assignment 3
1. The register extended stack pointer holds the highest stack.
Extended Stack Pointer which is present in the stack pointer invariably points to the present top
EBP is used by high-level languages to reference local vari
Week1 Assignment 1
a. 0000 0001 0010 0110 1111 1001 1101 0100
b. 0110 1010 1100 1101 1111 1010 1001 0101
c. 1111 0110 1001 1011 1101 1100 0010 1010
7.4 Write a CREATE TABLE statement for the DEPARTMENT table.
CREATE TABLE DEPARTMENT (
Department_name char(60) NOT NULL,
Budget_code char(60) NOT NULL,
Office_number char(20) NOT NULL,
Phone char(15) NOT NULL
7.5 Write a CREATE
Week 6 Dropbox
A. Convert this data model to a database design. Specify tables, primary keys, and foreign
keys. Using Figure 6-41 as a guide, specify column properties.
B. Describe how you have represented weak entities, if any exist.
Week 3 Dropbox
3.54 Consider the relation:
PERSON_2 (Name, Sibling, ShoeSize,Hobby)
Assume that the following functional dependencies exist:
Describe deletion, modification, and insertion anomalies for
Week 2 Dropbox
2.20 Write an SQL statement to display unique WarehouseIDs.
SELECT DISTINCT WarehouseID
2.29 Write an SQL statement to display the SKU, SKU_Description, WarehouseID, and
QuantityOnHand for all products having a Quan