Question: Freshmen Conputer Science. Writing Object classes. Topics: Writing Object Classes 1. Create a class, EacabookStatus, .that represents a Facebook status. The class will have the

Freshmen Conputer Science.
Writing Object classes.  Freshmen Conputer Science. Writing Object classes. Topics: Writing Object Classes 1.

Topics: Writing Object Classes 1. Create a class, EacabookStatus, .that represents a Facebook status. The class will have the following attributes: . status - the status nrof.ikes- the number of times this status has been liked. publis EacebookStatus (String status) I sets the status, and initializes In addition, the class should have two constuctors: to 0. status and nrOflikes to the specified parameters. The class will also have the following methods: ewbus string tostring() " That creates and returns a string representation of the class. You chose the format. 2. Now, create another class EacebookUser that represents a Facebook user. This class the first name. lastName- the last name of the user the username of the user . statuses- an array of Facebook statuses posted by the user The following constructor: String username) II That sets all the attributes to the values of the parameters. The array of statuses is set to an empty array. . pubiic String sestrina ) Creates and returns a String representation of the user including all the statues. pubLis void add (Eassbeaksasua tostatua) I/A method that adds a fbStatus to the array of statuses. To accomplish this you will create a new array that is the size of the current array plus 1 and then copy all the elements of the original array of statuses, and then insert the element (bStatus) at the end, and finally assign the new array to the attribute statuses. . A main method that: o creates a facebook user. o creates at least 5 facebook statuses. o prints the facebook user. o adds them to the user. o prints the user. For the main method you do not have to read input from the user, you can just hardcode the values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!