Question: Object Oriented Assignment (Need help doing these classes) Instructions Following classes are present in object-oriented software store:IOpenSourceSoftware InterfaceHas methods getDeveloperCount getPopularityScore ICommercialSoftware InterfaceHas methods getFeatureCount

Object Oriented Assignment (Need help doing these classes)

Instructions

Following classes are present in object-oriented software store:IOpenSourceSoftware InterfaceHas methods

getDeveloperCount

getPopularityScore

ICommercialSoftware InterfaceHas methods

getFeatureCount

getPrice

AbstractLinuxSoftware Abstract Class

Has method runOnAndroid

Has method - getLinuxDescription

AbstractWindowsSoftware Abstract Class

Has method runOnSurface

Has method - getWindowsDescription

MSExcel

PremiumMSExcel

ApacheSpark

LightApacheSpark

Identify all the variables and methods required for different types of softwares and use them in your Java classes. If all required variables and methods are not included, MARKS will be deducted.

Use following inheritance hierarchy.

MSExcel implements ICommercialSoftware and extends AbstractWindowsSoftware

MSExcel

getPrice method returns price multiplying feature with 5

ApacheSpark implements contracts defined in IOpenSourceSoftware and extends AbstractLinuxSoftware

getPopularityScore returns some hard coded integer

Write a specialized PremiumExcel class with following behaviors

Inherits MSExcel

getPrice method returns price multiplying feature with 10

Write a specialized LightApacheSpark class with following behaviors

Inherits ApacheSpark

Has twice the popularityScore as ApacheSpark

getLinuxDescription() of LightApacheSpark class should return (Identify variables and methods required using the following snippet):

Software Name: Light Apache Spark

Popularity Score: 200

Developer Count: 20

Time Stamp:

getWindowsDescription() of PremiumMSExcel class should return (Identify variables and methods required using the following snippet):

Software Name: Premium MSExcel

Feature Count: 10

Price: 100

Time Stamp:

Any changes to a base class should get reflected accordingly. (Example: Change in price for MSExcel changes the price of PremiumMSExcel).

Create TestSoftware.java file to test your code and put appropriate testing code for each object.

Total Possible Points: 100

Draw inheritance diagram with Class name, variables and methods that shows the inheritance relationships between the above 8 classes 10 points(Submit as pdf or jpeg)

Program runs as submitted - 5 points

Design MSExcel Class to meet the requirements as described above 15 points

Design PremiumMSExcel Class to meet the requirements as described above 15 points

Design ApacheSpark Class to meet the requirements as described above 15 points

Design LightApacheSpark Class to meet the requirements as described above 15 points

Write a TestSoftware Class to invoke the behavior of the specific softwares using their instances as asked below - 25 points divided as below

Created object of MSExcel and print details using getWindowsDescription 5 points

Created object of PremiumMSExcel and print details using getWindowsDescription 5 points

Created object of ApacheSpark and print details description using getLinuxDescription 5 points

Created object of LightApacheSpark and print details using getLinuxDescription 5 points

Test other public methods 5 points

------------------------------------

IOpenSourceSoftware.java

-------------------------------------

/**

*

*/

package softwarestore;

/**

* @author chokshi

*

*/

public interface IOpenSourceSoftware {

int getDeveloperCount();

int getPopularityScore();

}

------------------------------------

ICommercialSoftware.java

-----------------------------------

/**

*

*/

package softwarestore;

/**

* @author chokshi

*

*/

public interface ICommercialSoftware {

int getFeatureCount();

double getPrice();

}

-------------------------------------

AbstractLinuxSoftware.java

--------------------------------------

/**

*

*/

package softwarestore;

/**

* @author chokshi

*

*/

public abstract class AbstractLinuxSoftware implements

IOpenSourceSoftware{

private int developerCount;

private int popularityScore;

public void setDeveloperCount(int developerCount) {

this.developerCount = developerCount;

}

public void setPopularityScore(int popularityScore) {

this.popularityScore = popularityScore;

}

@Override

public int getDeveloperCount() {

// TODO Auto-generated method stub

return 0;

}

@Override

public int getPopularityScore() {

// TODO Auto-generated method stub

return 0;

}

}

-----------------------------------------

AbstractWindowSoftware.java

-----------------------------------------

/**

*

*/

package softwarestore;

/**

* @author chokshi

*

*/

public abstract class AbstractWindowsSoftware implements

ICommercialSoftware {

private int featureCount;

/**

* @param featureCount the featureCount to set

*/

public void setFeatureCount(int featureCount) {

this.featureCount = featureCount;

}

/* (non-Javadoc)

* @see softwarestore.ICommercialSoftware#getFeatureCount()

*/

@Override

public int getFeatureCount() {

return featureCount;

}

/* (non-Javadoc)

* @see softwarestore.ICommercialSoftware#getPrice()

*/

@Override

public double getPrice() {

// TODO Auto-generated method stub

return featureCount * 20;

}

}

--------------------------

MSExcel.java

--------------------------

/**

*

*/

package softwarestore;

/**

* @author chokshi

*

*/

public class MSExcel extends AbstractWindowsSoftware implements

ICommercialSoftware{

public MSExcel() {

this.setFeatureCount(300);

}

/* (non-Javadoc)

* @see softwarestore.AbstractWindowsSoftware#getPrice()

*/

@Override

public double getPrice() {

// TODO Auto-generated method stub

return this.getFeatureCount()*5;

}

}

---------------------------

PremiumExcel.java

---------------------------

/**

*

*/

package softwarestore;

/**

* @author chokshi

*

*/

public class PremiumExcel extends MSExcel implements ICommercialSoftware {

/**

*

*/

public PremiumExcel() {

// TODO Auto-generated constructor stub

this.setFeatureCount(600);

}

/* (non-Javadoc)

* @see softwarestore.ICommercialSoftware#getPrice()

*/

@Override

public double getPrice() {

//

}

}

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!