+1 480 409 0818 
Java Assignment Helper
2419 Order Completed
99 % Response Time
79 Reviews
Since 2010

Java Assignment Helper

Washington, USA

Jimmy K

Bachelor of Computer Science, George Washington University;

Profession

Professional Programming assignment helper in the USA

Skills

I have been working as a programming assignment helper for more than ten years. I am based in Washington, where I have worked with many students from top universities. I am a Java assignment help specialist even though I know all the other areas in programming. Over my ten year period working with programminghomeworkhelp.com, I have delivered more than 2400 orders in Java. My passion is helping students to pass their programming assignments as well as have adequate knowledge in programming. If you are looking for a reliable programming assignment helper in the USA, then I am here to help you score better grades.

Get Free Quote
0 Files Selected

Text File Reading

/** * A beehive will consist of only one Queen bee (is not considered as a Bee * object as it is quite different). Other entities include eggs, larva, pupa, * female worker bees and male drone bees. The population of worker and drone * bees fluctuate depending on the varying daily egg laying of capability of the * queen. With the exception of the Queen, all eggs, larva, pupa, worker and * drones are considered as Bee objects to be instantiated from the Bee class. * For future extension purposes, the instances of the class Bee should be made * sortable based on the age attribute. * */ public class Bee { public static int beeCount = 0; // Whole number – (Class Variable/shared across all instances) private int beeId; // Whole number (Unique and incremental identifier for each instance) private int age; // Whole number private String type; // Text (values include 'egg','larva', 'pupa', 'worker','drone') private int nectarCollectionSorties; // Whole number (how many times a worker bee has gone to fetch nectar on a // particular day) private boolean eaten; // True/False (whether the larva/worker/drone received its share of honey on a // particular day) private boolean alive; // True/False (whether or not the larva/worker/drone is alive) public Bee() { beeCount += 1; this.beeId = beeCount; this.age = 0; this.type = "Egg"; this.nectarCollectionSorties = 0; this.eaten = false; this.alive = true; } public Bee(int age, String type) { beeCount += 1; this.beeId = beeCount; this.age = age; this.type = type; this.nectarCollectionSorties = 0; this.eaten = false; this.alive = true; } public int compareTo(Object obj) { if (obj instanceof Bee) { Bee bee = (Bee)(obj); if(bee.getBeeId() < this.beeId) { return -1; } else if (bee.getBeeId() > this.beeId) { return 1; } else { if (bee.getType().equals(this.type)) { return 0; } } } return 1; } public int getAge() { return age; } public int getBeeId() { return beeId; } public int getNectarCollectionSorties() { return nectarCollectionSorties; } public String getType() { return type; } public void incrementAge() { this.age += 1; } public void incrementNectarCollectionSorties() { this.nectarCollectionSorties += 1; } public boolean isAlive() { return this.alive == true; } public boolean isEaten() { return this.eaten == true; } public void setAge(int age) { this.age = age; } public void setAlive(boolean alive) { this.alive = alive; } public void setEaten(boolean eaten) { this.eaten = eaten; } public void setNectarCollectionSorties(int nectar) { this.nectarCollectionSorties = nectar; } public void setType(String type) { this.type = type; } @Override public String toString() { // return "Bee ID: " + this.beeId + // "\nAge: " + this.age + // "\nType: " + this.type + // "\nNectar Collection Sorties: " + this.nectarCollectionSorties + // "\nHas eaten: " + this.eaten + // "\nIs alive: " + this.alive; return "Bee [beeCount=" + beeCount + ", beeId=" + beeId + ", type=" + type + ", age=" + age + ", nectarCollectionSorties=" + nectarCollectionSorties + ", eaten=" + eaten + ", alive=" + alive + "]"; } }

Java classes and objects

import java.util.Scanner; public class ChocolateCoupons { // Entry point of the program public static void main(String[] args) { Scanner in = new Scanner(System.in); // Ask the money of the user System.out.println("How much money can you spend on chocolate bars?"); int cash = in.nextInt(); // Calculate how many chocolate bars can be bought // Each choc costs $1 int numChocs = cash; // Each choc has a coupon int numCoupons = numChocs; // We use the coupons to buy another set of chos // 6 coupons is to 1 choc while (numCoupons>= 6) { numCoupons -= 6; numChocs += 1; // More coupon for each choc numCoupons++; } // Report the total number of chocs System.out.println("After redeeming coupons, you have " + numCoupons + " leftover coupons and can purchase a total of " + numChocs + " chocolate bars."); } }