Camera.java
Camera.java
public class Camera extends Product
{
private int numPixels;
public Camera(int wa
anty, String
and, float screenSize, int numPixels)
{
super(wa
anty,
and, screenSize);
this.numPixels = numPixels;
}
public int getNumPixels()
{
return numPixels;
}
public void setNumPixels(int numPixels)
{
this.numPixels = numPixels;
}
}
Mobile.java
Mobile.java
public class Mobile extends Product
{
private String color;
private int storageCapacity;
public Mobile(int wa
anty, String
andName, float screenSize, int storageCapacity, String color)
{
super(wa
anty,
andName, screenSize);
this.color = color;
this.storageCapacity = storageCapacity;
}
public String getColor()
{
return color;
}
public void setColor(String color)
{
this.color = color;
}
public int getStorageCapacity()
{
return storageCapacity;
}
public void setStorageCapacity(int storageCapacity)
{
this.storageCapacity = storageCapacity;
}
}
Orders.txt
1,10
2,20
3,30
Orders1.txt
1,50
2,20
3,80
Orders2.txt
1,10
2,20
3,10
Product.java
Product.java
public class Product
{
private String
and;
private int wa
anty;
private float screenSize;
public Product(int wa
anty, String
and, float screenSize)
{
this.wa
anty = wa
anty;
this.
and =
and;
this.screenSize = screenSize;
}
public int getWa
anty()
{
return wa
anty;
}
public void setWa
anty(int wa
anty)
{
this.wa
anty = wa
anty;
}
public String getBrand()
{
return
and;
}
public void setBrand(String
and)
{
this.
and =
and;
}
public float getScreenSize()
{
return screenSize;
}
public void setScreenSize(float screenSize)
{
this.screenSize = screenSize;
}
}
Report.docx
Class Product
Base class, to be used for inheritance
Variables
Scope
String
and
private
int wa
anty
private
float screenSize
private
Methods
Parameters and return type
Getters and setters
Parameters and return type based on variable
Constructo
Parameters int, String , float. No return type
Class Mobile
To create objects which hold information for mobiles
Variables
Scope
String colo
private
int storageCapacity
private
Methods
Parameters and return type
Getters and setters
Parameters and return type based on variable
Constructo
Parameters based on base class and int, String. No return type
Class Camera
To create objects which hold information for cameras
Variables
Scope
int numPixels
private
Methods
Parameters and return type
Getters and setters
Parameters and return type based on variable
Constructo
Parameters based on base class and int. No return type
Class Tablet
To create objects which hold information for tablets
Variables
Scope
String operatingSystem
private
int storageCapacity
private
Methods
Parameters and return type
Getters and setters
Parameters and return type based on variable
Constructo
Parameters based on base class and int, String. No return type
Interface StockLimit
Holds minimum and maximum stock limit constants
Variables
Scope
final int MINIMUM_STOCK
default
final int MAXIMUM_STOCK
default
Class StockLimitException
To throw exception when stock limit is crossed
Methods
Parameters and return type
Constructo
Parameters based on base class. No return type
Class Stocks
To define various operations for processing stocks
Variables
Scope
List
mobileList
private
List cameraList
private
List tabletList
private
Methods
Parameters and return type
Constructo
No parameters. No return type
displayStocks
No parameters. Return type void.
readData
Parameters String. Return type List writeFinalStocks
No parameters. Return type void.
readOrders
Parameters String. Return type void.
readStocks
Parameters String. Return type void.
Class Repository
To test the functionality of the project
Methods
Parameters and return type
main
Parameters String[]. Return type...