'I'm not able to crack the right code for DayFinder in Single Dimensional Array
public class DayFinder {
//The current day of week is taken in int (For Sunday 1, Monday 2, Tuesday 3....Saturday 7)
public String predictDay(int currentDay, int noOfDaysFromToday)
{
return "";
}
public static void main(String[] args){
DayFinder dayFinder = new DayFinder();
// Accept input of medicine taken day and the next dose to be taken in how many days
int medicineTakenOn = 0;
int daysToNextDose = 0;
// call the method to predict the day the next dose must be taken
String nextDoseToBeTakenOn = "";
// display the day
System.out.println("Your next dose should be taken on : " + nextDoseToBeTakenOn);
}
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
