Skip to content
Snippets Groups Projects
Commit 724a7932 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

javadoc

parent e58dfa74
No related branches found
No related tags found
No related merge requests found
......@@ -7,10 +7,20 @@ package MV3500Cohort2023MarchJune.projects.Islas;
import java.io.*;
import java.net.*;
/** Model */
public class Client_Customer {
/** Constructor */
public Client_Customer()
{
}
/** Command line interface
* @param args arguments
*/
public static void main(String[] args) {
// TODO - Fill out the following questionairre:
// TODO - Fill out the following questionnaire:
double averageBeefPurchase = 2; // How many pounds of beef do you typically purchase when you buy groceries?
double averageVariationInBeefPurchase = 0.5; // How much do you typically vary from the above amount (also in pounds)?
......
......@@ -15,7 +15,7 @@ public class Client_Farm {
*/
public static void main(String[] args) {
// TODO - Fill out the following questionairre:
// TODO - Fill out the following questionnaire:
int cattleCount = 50; // How many cows are on the farm?
......
......@@ -16,7 +16,15 @@ public class Customer extends SimEntityBase{
private RandomVariate chickenPreference;
private RandomVariate eggsPreference;
/** Constructor */
/** Constructor
* @param averagePurchaseOfBeef initialization value
* @param beefPlusMinus initialization value
* @param averagePurchaseOfPork initialization value
* @param porkPlusMinus initialization value
* @param averagePurchaseOfChicken initialization value
* @param chickenPlusMinus initialization value
* @param averagePurchaseOfEggs initialization value
* @param eggsPlusMinus initialization value */
public Customer(double averagePurchaseOfBeef, double beefPlusMinus, double averagePurchaseOfPork, double porkPlusMinus, double averagePurchaseOfChicken, double chickenPlusMinus, double averagePurchaseOfEggs, double eggsPlusMinus) {
this.beefPreference = RandomVariateFactory.getInstance("Normal", averagePurchaseOfBeef, beefPlusMinus);
this.porkPreference = RandomVariateFactory.getInstance("Normal", averagePurchaseOfPork, porkPlusMinus);
......
......@@ -14,9 +14,13 @@ public class FarmStore {
private double CHICKENCOST = 2; // Cost per pound
private double EGGSCOST = 2; // Cost per dozen
/** state variable */
protected double beefQuantity; // Quantity in pounds
/** state variable */
protected double porkQuantity; // Quantity in pounds
/** state variable */
protected double chickenQuantity; // Quantity in pounds
/** state variable */
protected double eggQuantity; // Quantity in dozens
/** Constructor */
......
......@@ -16,7 +16,11 @@ public class LivestockRanch {
private double chickenProcessRate;
private double eggLayingRate;
/** Constructor */
/** Constructor
* @param totalCattle initialization value
* @param totalPigs initialization value
* @param totalBroilerChickens initialization value
* @param totalLayerChickens initialization value */
public LivestockRanch (int totalCattle, int totalPigs, int totalBroilerChickens, int totalLayerChickens) {
this.totalCattle = totalCattle;
this.totalPigs = totalPigs;
......@@ -29,42 +33,50 @@ public class LivestockRanch {
this.eggLayingRate = totalLayerChickens * (25 / 12); // 25 eggs per layer chicken (divided by 12 to be sold in dozens)
}
/** accessor */
/** accessor
* @return total number */
public int getTotalCattle() {
return totalCattle;
}
/** accessor */
/** accessor
* @return total number */
public int getTotalPigs() {
return totalPigs;
}
/** accessor */
/** accessor
* @return total number */
public int getTotalBroilerChickens() {
return totalBroilerChickens;
}
/** accessor */
/** accessor
* @return total number */
public int getTotalLayerChickens() {
return totalLayerChickens;
}
/** Javadoc goes here */
/** accessor
* @return rate */
public double getCattleProcessRate() {
return cattleProcessRate;
}
/** accessor */
/** accessor
* @return rate */
public double getPigProcessRate() {
return pigProcessRate;
}
/** accessor */
/** accessor
* @return rate */
public double getChickenProcessRate() {
return chickenProcessRate;
}
/** accessor */
/** accessor
* @return rate */
public double getEggLayingRate() {
return eggLayingRate;
}
......
......@@ -7,7 +7,17 @@ package MV3500Cohort2023MarchJune.projects.Islas;
import java.io.*;
import java.net.*;
/** Model */
public class Server {
/** Constructor */
public Server()
{
}
/** Command line interface
* @param args arguments
*/
public static void main(String[] args) {
FarmStore market = new FarmStore();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment