Please write a code that will look like this. You CANNOT use ArrayLists or any type of List to store objects, Breaks, or continue statemets throughout the entire project. PLEASE only use basic Arrays Correctly use the “Prime the Read” method for inputting data before a sentinel loop. Note: You may not use any break or continue statements in your program to earn these points.

import java.util.Scanner;
public class Influenza {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int capacity = 1000;
String[] fluList = new String[capacity];
int[] ageList = new int[capacity];
String flu;
int age;
int size = 0;
System.out.println("Welcome to the Flu Tracker.");
System.out.println("Type of the name of the Influenza Type (x to exit)");
flu = in.next();
while (!flu.equalsIgnoreCase("x")) {
System.out.println("What is the age of the patient?");
age = in.nextInt();
fluList[size] = flu;
ageList[size++] = age;
System.out.println("Next Patient");
System.out.println("Type of the name of the Influenza Type (x to exit)");
flu = in.next();
}
System.out.println("Summary information");
if(size == 0) {
System.out.println("There were: 0 cases of Flu to summarize");
} else {
int avg = 0;
for(int i = 0; i < size; ++i) {
System.out.println("Type: " + fluList[i] + " Age: " + ageList[i]);
avg += ageList[i];
}
System.out.println("There were: " + size + " cases of Influenza with an average age of " + (avg/size));
}
}
}
Please write a code that will look like this. You CANNOT use ArrayLists or any type...
Write a C# code for a Sales Calculator: Note: You cannot use the foreach loop in any part of this program! sales.txt file: 1189.55, 1207.00, 1348.27, 1456.88, 1198.34, 1128.55, 1172.37, 1498.55, 1163.29 The application should have controls described as follows: • A button that reads Get Sales. If the user clicks this button, the application should call a method named ProcesSalesFile. ProcessSalesFile Method: accepts no arguments and does not return anything The ProcessSalesFile Method will do the following: o Open...
write in java code.
oop.
i dont have its written code.
i have its output in the thrid picture and how the inheritance
works with the second picture.
just need it in full written code and uni class will be.
jus need you to write the whole code for me as its an extra
question which i need for my preparation of my exam.
add
as you but it must be correct and similar to the question
Inheritance Do the...
Write a C# code for a Sales Calculator: Note: You cannot use the foreach loop in any part of this program! sales.txt file: 1189.55, 1207.00, 1348.27, 1456.88, 1198.34, 1128.55, 1172.37, 1498.55, 1163.29 The application should have controls described as follows: • A button that reads Get Sales. If the user clicks this button, the application should call a method named ProcesSalesFile. ProcessSalesFile Method: accepts no arguments and does not return anything The ProcessSalesFile Method will do the following: o Open...
Code in C++, use classes and comment on the code, please Scenario The users will be able to set the number of floors on the building, the number of offices on each floor, the rent of each office per month at the start of the program. They will be able to see the number of empty offices in total within the building and as well as the number of offices available per floor. They will also be able to exit...
Please write in ECLIPSE JAVA. Please no buffered readers and please do not use Java’s built in data structures or data functionality (Like sorting and searching), however stuff like java.util.scanner and wild cards like java.io.* and java.util.* are fine, but please remember I am very much a beginner at this and would much rather understand the material instead of doing it the easier way using built-in data structures. It would also be nice if you could do it in the...
Write a program that demonstrates use of programmer - defined
data structures. Please provide code! Thank you.
Here are the temps given:
January 47 36
February 51 37
March 57 39
April 62 43
May 69 48
June 73 52
July 81 56
August 83 57
September 81 52
October 64 46
November 52 41
December 45 35
Janual line Iranin Note: This program is similar to another recently assigned program, except that it uses struct and an array of...
Use python write
Thank you so much!
pets.txt
dog alyson 5.5
cat chester 1.5
cat felice 16
dog jesse 14
cat merlin 5
cat percy 12
cat puppet 18
to_transfer.txt
cat merlin 5
cat percy 12
intake.txt
bird joe 3
cat sylvester 4.5
the website is
https://www2.cs.arizona.edu/classes/cs110/spring17/homework.shtml
Welcome to animal shelter management software version 1.0 Type one of the following options adopt a pet adopt intake add more animals to the shelter list. display all adoptable pets quit exit the...
Objectives This is one of three major programming projects this semester. You should NOT collaborate on this project. While you may ask for assistance in debugging, this project should be ENTIRELY your own work. Objectives include: . Use local variables. • Use arithmetic expressions. • Use Scanner to input values. • Use a class constant. • Use of nested branches. • Use for loxops. • Use of methods. • Use of arrays. Hand-in Requirements All projects and laboratories will be...
Please use C programming to write the code to solve the following problem. Also, please use the instructions, functions, syntax and any other required part of the problem. Thanks in advance. Use these functions below especially: void inputStringFromUser(char *prompt, char *s, int arraySize); void songNameDuplicate(char *songName); void songNameFound(char *songName); void songNameNotFound(char *songName); void songNameDeleted(char *songName); void artistFound(char *artist); void artistNotFound(char *artist); void printMusicLibraryEmpty(void); void printMusicLibraryTitle(void); const int MAX_LENGTH = 1024; You will write a program that maintains information about your...