Complete independent research and review two (2) to three (3) online end-user license agreements. Compare and contrast each EULA with each other. In your response, please consider the following: ·….
design a class by inheriting properties from another class.
Objective: To be able to design a class by inheriting properties from another class.
Problem Description: Given a robot that can collect unwanted newspapers from different locations, the idea is to design and program this very simple robot. Let’s call this robot Pecky.
Pecky’s class definition should contain the following information:
– member variables: they should capture Pecky’s location (x coordinate, y coordinate) in the map; a bag where Pecky stores the collected newspapers. The map coordinates can be double or integer type. While the bag should be an integer type variable that would increase everytime Pecky collects a newspaper and decrease everytime Pecky drops a newspaper.
– constructors: it is optional to include the default one. But you need to add one that would create a version of Pecky and place it on a desired location at the map and with an initial number of newspapers in the bag to begin with.
– appropriate getters and setters.
– other methods: provide the following methods –
a. pickUpANewsPaper(): as soon as this method is called Pecky’s collector bag gets updated by adding one more newspaper.
b. dropANewsPaper(): as soon as this method is called Pecky’s collector bag gets updated by decreasing one newspaper.
c. move() : as soon as this method is called Pecky moves to a new location using the approach –
x_cor = x_cor + 1
y_cor = y_cor + 1
Once you have the class definition for Pecky ready, you should design a new type of Pecky, known as FastPecky, by inheriting from Pecky. The specialty of FastPeckyis that it can move very fast compared to a basic type of Pecky. Your job is to design a new move method that is appropriate for FastPecky.
Deliverables: a Java project consisting of three classes: Pecky.java, FastPecky.java and Robot.java (where the main method exists).