...
Code Block | ||
---|---|---|
| ||
int main () { Employee *coder = new Employee("Joe Smith"); Employee *typist = new Employee("Bill Jones"); Manager *designer = new managerManager("Jane Doe", *typist); coder = designer; coder.print(); } |
Now, the object {[designer
}} is not sliced, and the output is:
Manager: Jane Doe
Assistant: " Bill Jones"
Risk Assessment
Slicing results in information being lost which could lead to a program not working properly, and hence to a denial of service attack.
...