Hello, world.
Show "hello, world!" on screen.
Solution.
Multiplying table
Write a program asking the a number, and display its mutiplying table.
Solution.
Dynamic inheritance
Write a program that, following some conditions that can be true or not,
changes the parent of the object EmpleadoEmpresa from EmpleadoAuxiliar to Directivo.
Solution.
Presentation
Write a program asking the name of the user, and repeat them
on the screen.
Solution.
Even numbers
Write a program deciding whether a given number is even or odd.
Solution.
Prime numbers
Write a program calculating the first n primer numbers.
Solution.
x powered to y
Write a program calculating xy.
Solution.
console calculator
Write a program allowing adding, substracting, multiplying and divding.
Solution.
Contact management
Write a program that, by means of a menu, allows to add, list or delete contacts (name and e.mail)
Solution.
Object creation.
You should create the "Point" prototype, with the x and
y attributes, and write its attributes on screen.
Solution.
Presentation
Write a program asking the name and age of the user, and repeat them
on the screen.
Solution.
Multiplying table
Write a program asking the a number, and display its mutiplying table.
Solution.
Multiplying table
Write a program asking the a number, and display its factorial.
Solution.
Inheritance.
The objective is to create the "Line" prototype, with
two attributes pointing to two objects of the "Point"
prototype. It is necessary to copy this object in order
to create a new one, and write its attributes on screen.
Solution.
Polyphormism.
The objective is to create a "Shape" prototype.
"Circle" and "Rectangle" should derive from it,
implementing the "calcArea" method, mandatorily because
of the inheritance from "Shape". Give the user the
option to create a circle or a rectangle and, once
created, calculate the are of the shape without knowing
what kind of shape is involved.
Solution.
8-queen problem
Write a program that solves the eight-queen problem.
Solution.
Contact management
Write a program that, by means of a menu, allows to add, list or delete contacts (name and e.mail)
Solution.
Dynamic inheritance
The objective is to create, using the "Map" container
of the standard library, able to store object in an
associative manner, create two protoypes, "EmptyMap" and
"NonEmptyMap". Create another object inheriting from
these two prototypes (alternatively), when the
conditions given by their names are met. This implies
changing the "parent" attribute.
Solution.