#Sales Offer!| Get upto 25% Off:

Objective: To be able to design a class definition and create object(s) of that class type.
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.
Peck’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.
Once you have the class definition for Pecky ready, you should use another class (Robot.java) with the main method to create objects of type Pecky. Provide examples that you can create objects of Pecky type and make it work by asking it to perform different actions (for example, pick a paper, drop a paper, how many papers you have right now in your collection and so on).
Deliverables: a Java project consisting of two classes: Pecky.java and Robot.java (where the main method exists).

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!