Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

My code won't show any output what should i do?- code is below Here is the expected output example Sample Input 1 1 EasyCheesy 10

My code won't show any output what should i do?- code is below

Here is the expected output example

Sample Input 1

1 EasyCheesy 10 20 12 50 0 

Sample Output 1

====================== -----TODAY'S PLAN----- ---------------------- Priority:EasyCheesy Assignments:10 Completed:20 Hours Avail:12 Tot. Points:50.0

import java.lang.Math;

public class Assignment {

private String name;

private int effort;

private int resources;

private int difficulty;

private double score;

public Assignment(int effort, int resources, int difficulty) {

this.effort = effort;

this.resources = resources;

this.difficulty = difficulty;

this.score = 0.1 * (effort * difficulty + (resources * effort)*2 / (Math.PI * difficulty));

}

public String getName() {

return name;

}

public int getEffort() {

return effort;

}

public int getResources() {

return resources;

}

public int getDifficulty() {

return difficulty;

}

public double getScore() {

return score;

}

public static void main(String[] args) {

}

} class AssignPlan {

private int numAssignments;

private int numComplete;

private double totalPoints;

private int hoursAvailable;

private String highestPriorityItem;

public AssignPlan() {

this.numAssignments = 0;

this.numComplete = 0;

this.totalPoints = 0;

this.hoursAvailable = 0;

this.highestPriorityItem = "";

}

public AssignPlan(int numAssignments, int numComplete, double totalPoints, int hoursAvailable, String highestPriorityItem) {

this.numAssignments = numAssignments;

this.numComplete = numComplete;

this.totalPoints = totalPoints;

this.hoursAvailable = hoursAvailable;

this.highestPriorityItem = highestPriorityItem;

}

public int getNumAssignments() {

return numAssignments;

}

public int getNumComplete() {

return numComplete;

}

public double getTotalPoints() {

return totalPoints;

}

public int getHoursAvailable() {

return hoursAvailable;

}

public String getHighestPriorityItem() {

return highestPriorityItem;

}

public void setHighestPriorityItem(String highestPriorityItem) {

this.highestPriorityItem = highestPriorityItem;

}

public void getUrgentAssignment(String name, int effort, int resources, int difficulty) {

Assignment a = new Assignment(effort, resources, difficulty);

this.highestPriorityItem = a.getName();

this.numAssignments++;

this.numComplete++;

this.hoursAvailable -= a.getEffort();

this.totalPoints += a.getScore();

}

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

An administrative agency is created by the executive branch

Answered: 1 week ago