Question: Hello, I am currently learning Java and just got introduced to interfaces, generics, and lists in the class I am in. We are assigned a
Hello,
I am currently learning Java and just got introduced to interfaces, generics, and lists in the class I am in. We are assigned a program that deals with these elements and I need some help to complete it.
I will post the directions to it below as pictures .
Thank you!



An IT company employs two types of employees: programmers and testers. They both work for the company and will be represented by the following Java class hierarchy: kinterface> AbleToWork +work): int Programmer Tester The interface ablork has an abstract method e. The classes Programmer and Tester will implement the interface. A Programmer writes code, and the Tester is focused on testing it. A project is completed by the cooperation of programmers and testers. Create a Java project named CS235PA8_YourName. 1. 2. Define the AbleToWork interface. It must contain the abstract method vwork 3. Define the Programmer and Tester classes. They should implement AbisToWerk interface. A programmer is able to write a certain number of lines of code per day, captured by an instance variable linesofcodeNrittenPerDay. A programmer's work method returns the number of lines of code he/she wrote on a given day, which is a random number between 50% and 150% of linesofcodeawrittenPerDay (some days are not as good as others, and some tasks are harder/easier than others). You could use the following code to generate a such random number: Random randwen = new Random(); int codewritten = (int) (linesofCodePerDav * 0.5) + xandGen.nextnt (lineofCodeRerDay); Check out the documentation for pextint (int bound) of class Random at the Java API A Tester is able to test a given number of lines of code per day, captured by an instance variable 1inesofCodeTestedperDay. A tester's work method returns the number of lines of code he/she tested that day, which is a random number between 75% and 125% of linesofCodeTestedRerDay, You could similarly use nextInt int bound) of class Random to generate such random number: Random randennew RandomO int codeTested = (int) (linesOfCodeTestedPerway * 0.75) + (int) (zandGen.nextInt (linesOfCodeTestedPexDay) 0.5); Besides the instance variable linesofCodeWrittenDerDay/ linesofcodeTestedperDay both programmer and tester have a name and ID numbeir
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
