Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The images are in sequence and are not individual questions. I wanted to clarify that because I know policy is to only answer one question,

The images are in sequence and are not individual questions. I wanted to clarify that because I know policy is to only answer one question, but please share the proper code as I have started on the last two images and would like to know what is the final code.

UPDATE: Please create a suitable program that Implements the Serializable class.

"Question 3" Explains how the object Date should behave under the object employee. They do not extend from one another. Instead they are composed to one another. Then the employee class utilizes the date and its own attributes. The question is located on the image where it says "Question 4 cont'd

....

....

1.) Use serializable interface...

2.) use the driver in ..."

An output image is displayed on how the driver program should act "Driver (company.java)"

The remaining images are what I have worked on thus far, maybe you can correct or use what I have to make your work easier.

UPDATE 2: If you wanted the updated version of my code so far, I have uploaded it by replacing the old images. The image before my code is an example output on how the finished code should work. I do not have that final code for that unfortunately as it is what I am hoping you'd help with.

Thank image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribedimage text in transcribed

Question 3 A company want to keep a record of all its employees. So each time a new person is hired, the company add its information to a 1. Create a class "Date", with the following attributes monthlint), method "dateOK (int month, int day, int year)" that check if repertory day(int), year(int). With constructor (take the 3 attributes) and check that the date is valid. Create accessor, mutator and a The day is betwn very nmonths can have 1 da . The day is between 1 and 31 (for simplicity every months can have 31 days . The month is between 1 and 12 NB: Before setting the date you should check if it is valid. Modify the Date class to implement the Serializable See Date.java Date Question 4 (cont' d) 1. Create the class "Emplovee" ee", that has a constructor, accessor and utators and the following attributes: name (string, id (int) iredDate(Date return information of an employee implement the Serialization Interface. Modify the Employee class to See Employee.java 1. Use the Serializable Interface" to store all employees in a file 2. Use the driver in "Company, java write a method that reurns all CompanyRepertory.ser" employees hired after a particular Date thr implement the method write ToFile and readFromFil that allow to write and read a list employees from a file Furthermore See CompanySoftware.java Question 4 (cont'd) Driver (company.java) Please choose from one of the following options. View serialized objects: 1 Use the company System: 2 ***Wel come to Company System Henu: 1- Add a New Employee. 2- View employees) hired after a certain date. e- Exit What would you like to do? Please enter the name of the employee tristan Please enter the ID of the erployee 2345 Please the position of the employee Please the day the enployee wos hired it should in the interval 01,313 Please the month the employee was hired it should in the interval [1,12] Please the year the erployee was hired it should in the interval [1880,9999 1800 Menu 1- Add a New Employee. 2- view employee(s) hired after a certain date. 0- Exit What would you like to do? 5 public class Date implements Serializable private int month - 0, day0, year 0; @Override public String tostring ) t 10 return "Month: "t this.month + ", day:"+ this.day+ ", year: tthis.year: 12 13 public Date (int month, int day, int year) 14 15 16 17 18 19 public int getMonth () 20 21 this.month -month; this.dayday: this.yearyear; return month; 23 public void setMonth (int month) t 24 25 26 27 public int getDay 28 29 30 31 public void setDay (int day) t 32 this.month = month; return day; this.dayday: 3 4 35 public int getYear) return year 37 38 3ge public void setYear (int year) 40 41 42 43 public boolean dateOK (int month, int day, int year) t this.year year; if ( (month >= 1000 && month = 1 && day = 1 && month

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David Kroenke

4th Edition

0136086535, 9780136086536

More Books

Students also viewed these Databases questions

Question

Question Can any type of stock or securities be used in an ESOP?

Answered: 1 week ago

Question

Question Can a self-employed person adopt a money purchase plan?

Answered: 1 week ago