Solved ~ Two Dimensional Array DayCare Java (Source Code)[Netbeans]
Solved ~ Two Dimensional Array DayCare Java (Source Code)[Netbeans]
source Code - https://sellfy.com/p/ortykb/
QUESTION
Using Multidimensional Arrays
Summary
In this lab, you will complete a Java program that uses a two-dimensional array to store data for the Building Block Day Care Center. The day care center charges varying weekly rates depending on the age of the child and the number of days per week the child attends. The program should allow users to enter the age of the child and the number of days per week the child will be at the day care center. The program should output the appropriate weekly rate. The file provided for this lab contains all of the necessary variable declarations, except the two-dimensional array. You need to write the input statements and the code that initializes the two-dimensional array, determines the weekly rate, and prints the weekly rate. Comments in the code tell you where to write your statements. Weekly rates can be found in the provided table.
Instructions
Age: 1 2 3 4 5
0 30.00 60.00 88.00 115.00 140.00
1 26.00 52.00 70.00 96.00 120.00
2 24.00 46.00 67.00 89.00 110.00
3 22.00 40.00 60.00 75.00 88.00
4 + 20.00 35.00 50.00 66.00 84.00
Declare and initialize the two-dimensional array.
Write the Java statements that retrieve the age of the child and the number of days the child will be at the day care center.
Determine and print the weekly rate.
Execute the program.
__________________________________
import java.util.Scanner;
public class DayCare
public static void main(String args[])
// Declare two-dimensional array here.
// Declare other variables.
int numDays;
int age;
String numDaysString;
String ageString;
int QUIT = 99;
Scanner input = new Scanner(System.in);
// This is the work done in the getReady() method
// Perform a priming read to get the age of the child.
while(age != QUIT)
// This is the work done in the determineRateCharge() method
// Ask the user to enter the number of days
// Print the weekly rate
// Ask the user to enter the next child's age
// This is the work done in the finish() method
System.out.println("End of program");
System.exit(0);
// End of main() method.
// End of DayCare class.
Answer/Netbeans Output
run:
Enter age of child : 1
Enter number of days : 5
Weekly rate for the child is = 96
Enter age for next child or 99 to quit : 1
Enter number of days : 4
Weekly rate for the child is = 96
Enter age for next child or 99 to quit : 1
Enter number of days : 3
Weekly rate for the child is = 70
Enter age for next child or 99 to quit : 1
Enter number of days : 2
Weekly rate for the child is = 52
Enter age for next child or 99 to quit : 1
Enter number of days : 1
Weekly rate for the child is = 26
Enter age for next child or 99 to quit : 2
Enter number of days : 1
Weekly rate for the child is = 24
Enter age for next child or 99 to quit : 2
Enter number of days : 2
Weekly rate for the child is = 46
Enter age for next child or 99 to quit : 2
Enter number of days : 3
Weekly rate for the child is = 67
Enter age for next child or 99 to quit : 2
Enter number of days : 4
Weekly rate for the child is = 89
Enter age for next child or 99 to quit : 3
Enter number of days : 1
Weekly rate for the child is = 22
Enter age for next child or 99 to quit : 3
Enter number of days : 2
Weekly rate for the child is = 40
Enter age for next child or 99 to quit : 3
Enter number of days : 3
Weekly rate for the child is = 60
Enter age for next child or 99 to quit : 3
Enter number of days : 4
Weekly rate for the child is = 75
Enter age for next child or 99 to quit : 4
Enter number of days : 1
Weekly rate for the child is = 20
Enter age for next child or 99 to quit : 4
Enter number of days : 2
Weekly rate for the child is = 35
Enter age for next child or 99 to quit : 4
Enter number of days : 3
Weekly rate for the child is = 50
Enter age for next child or 99 to quit : 4
Enter number of days : 4
Weekly rate for the child is = 66
Enter age for next child or 99 to quit : 99
End of program
BUILD SUCCESSFUL (total time: 1 minute 35 seconds)
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Solved ~ Two Dimensional Array DayCare Java (Source Code)[Netbeans]», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.