Answer:
The complete program is as follows:
import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner s = new Scanner(System.in);
final int lent = 8;
Double averages[] = new Double[lent];
int loopIndex;
double battingAverage;
String averageString;
double min, max;
double total, average;
for(loopIndex = 0;loopIndex<lent;loopIndex++){
System.out.print("Enter a batting average: ");
averageString = s.nextLine();
battingAverage = Double.parseDouble(averageString);
averages[loopIndex] = battingAverage; }
min = averages[0];max = averages[0];
total = averages[0];
for(loopIndex = 1;loopIndex<lent;loopIndex++){
if(averages[loopIndex]>=max){
max = averages[loopIndex]; }
if(averages[loopIndex]<=min){
min = averages[loopIndex]; }
total+=averages[loopIndex]; }
battingAverage = total/8;
for(loopIndex = 0;loopIndex<lent;loopIndex++){
System.out.println(averages[loopIndex]+" "); }
System.out.println("Average: "+battingAverage);
System.out.println("Minimum: "+min);
System.out.println("Maximum: "+max);
System.exit(0);
}}
Explanation:
See attachment for complete program with comments
3. Carmen Villa runs a cooking blog, where she posts a new recipe each day. She wants to get a sense
of where her visitors are from, so she can choose recipes from the areas where her website visitors
live. What other site usage information might she be able to gather, and how can she use it to
improve the cooking blog for her visitors?
Answer:
im kinda confused on this question is ther a answer key
Explanation:
please help me with this coding problem :)
Consider the following field and incomplete method of some class. The method calcTotal is intended to return the sum of all values in vals.
private int[] vals;
public int calcTotal()
{
int total = 0;
/* missing code */
return total;
}
Which of the code segments shown below can be used to replace /* missing code */ so that calcTotal will work as intended?
I.
for (int i : vals)
{
total += i;
}
II.
for (int pos = vals.length; pos > 0; pos--)
{
total += vals[pos];
}
III.
int pos = 0;
while (pos < vals.length)
{
total += vals[pos];
pos++;
}
I only
II only
I and III
II and III
III only
Answer:
ll and lll
Explanation:
list dont be a looser
Critiquing design: for each of these teapots , finish the statement last on the right that critique the object design
Answer:
Hey you have to add your own opinion. Like What you like about the teapot. what you wish was different. And What if meaning if it was changed how would it differ.
Explanation:
I like the design or this teapot. I wish it was made a little different. What if it was made different, it would be of more use and better to me.
The method removeDupes is intended to remove duplicates from array a, returning n, the number of elements in a after duplicates have been removed. For example, if array a has the values {4, 7, 11, 4, 9, 5, 11, 7, 3, 5} before removeDupes is called, then after duplicates are removed, a will be {4, 7, 11, 5, 9, 3} and 6 will be returned.Consider the following three implementations of RemoveDupes. I. public static int removeDupes (int [ 1 a) int n-a.length; for (int i-0, icn; i+M int current- a [il: int j i+1; while (jcn)K if (currentaulK alil aln-1) return n; Il. public static int removeDupes (int [] a)t int n-a.length; for (int i-0; ikn; i++ int current a [il for (int j-0; j
Answer:
public int removeDupes(int[]a){
int n =0;
for(int x =0;x<a.length;x++){
for(int y=0;y<a.length;y++){
if(a[x]==a[y]){
n++;
}
}
int left = a.length-n;
return left;
}
}
Explanation:
Differentiate between computer engineering and software engineering
Answer:
Computer engineering is the field in tech that actually involves computers themselves. Software engineering is coding/designing software that runs on computers
Explanation:
A personal business letter may be written by ?
Answer:
a college student inquiring about a loan.
Explanation:
Y’all what’s some celebrities that have kids??
Answer:
Angelina Jolie
Parents: Jon Voight, Marcheline Bertrand
Eddie Murphy
Parents: Charles Edward Murphy, Lillian Murphy
Sandra Bullock
Parents: Helga Meyer, John W. Bullock
Kate Hudson
Parents: Goldie Hawn, Bill Hudson
Katie Holmes
Parents: Kathleen A. Stothers-Holmes, Martin Joseph Holmes, Sr.
Reese Witherspoon
Parents: Betty Reese, John Witherspoon
Meryl Streep
Parents: Harry William Streep, Jr., Mary Wolf Wilkinson
Oprah Winfrey
Parents: Vernon Winfrey, Vernita Lee
Tina Fey
Parents: Zenobia Xenakes, Donald Fey
Uma Thurman
Parents: Nena von Schlebrügge, Robert Thurman
David Beckham
Parents: David Edward Alan Beckham, Sandra Georgina West
Susan Sarandon
Parents: Leonora Marie Criscione, Phillip Leslie Tomalin
Sofía Vergara
Parents: Julio Enrique Vergara Robayo, Margarita Vergara Dávila de Vergara
Hilary Duff
Parents: Susan Colleen Duff, Robert Duff
Miley Cyrus
Parents: Billy Ray Cyrus, Tish Cyrus
Zoë Kravitz
Parents: Lisa Bonet, Lenny Kravitz
Beyoncé
Parents: Tina Knowles, Mathew Knowles
Alexis Bledel
Parents: Nanette Bledel, Martin Bledel
Hugh Grant
Parents: Finvola Grant, James Grant
Britney Spears
Parents: Lynne Spears, Jamie Spears
Cindy Crawford
Parents: Jennifer Sue Crawford-Moluf, John Crawford
Adele
Parents: Penny Adkins, Mark Evans
Gwyneth Paltrow
Parents: Blythe Danner, Bruce Paltrow
Solange Knowles
Parents: Tina Knowles, Mathew Knowles
Create each of the following as separate classes: Room, Beds, Bath, Suite, SubRoom. Create a single RoomOrSuite class with the instance variables int numBeds, boolean hasBath, and int numSubrooms. Create a Suite class with the instance variables int numBeds, boolean hasBath, and int numSubrooms. Create a subclass Room of Suite which will inherit the instance variables numBeds and hasBath from Room, but not the instance variable int numSubrooms. Create a Room class with the instance variables int numBeds, and boolean hasBath. Create a subclass Suite of Room which will inherit the instance variables of Room and has an additional instance variable int numSubrooms. Create a Room class with the instance variables int numBeds, and boolean hasBath. Create a separate class Suite with the instance variable int numSubrooms.
Answer:
Explanation:
The following is written in Java and creates each one of the classes as requested. They can be used as seperate files within the same package but for the sake of simplicity, I am adding them together in this answer.
class RoomOrSuite {
int numBeds;
boolean hasBath;
int numSubrooms;
}
class Room {
int numBeds;
boolean hasBath;
}
class Beds {
}
class Bath {
}
class Suite {
int numBeds;
boolean hasBath;
private int numSubrooms;
}
class SubRoom {
}
class RoomOfSuite extends Room{
}
class SuiteOfRoom extends Room {
int numSubrooms;
}
What can you think of as a box or container that holds a value and has a label?
a conditional
b variable
c algorithm
d paradigm
Answer:
I think its B
Explanation:
none of the answers make that much sense to me but i did the quiz and that was what it was.
Answer:its b
Explanation:
Find the number of ways in which a committee of 4 can be chosen from six boys and
six girls if it must contain at least one boy and one girl.
Answer:
465 ways
Explanation:
Atleast 1 girl and 1 boy
Possible combinations :
1 girl ; 3 boys = 6C1 ; 6C3
2 girls ; 2 boys = 6C2 ; 6C2
3 girls ; 1 boy = 6C3 ; 6C1
(6C1 * 6C3) + (6C2 * 6C2) + (6C3 * 6C1)
Combination formula:
nCr = n! ÷ (n-r)!r!
We can also use a calculator :
6C1 = 6
6C3 = 20
6C2 = 15
Hence,
(6C1 * 6C3) + (6C2 * 6C2) + (6C3 * 6C1)
(6 * 20) + (15 * 15) + (20 * 6)
120 + 225 + 120
= 465 ways
Insert the following formula into Excel sheet. Cos A+ |23|
examples of intermediate technology
Example of intermediate technology is the treadle pump, which enables farmers to provide a greater amount of water to their plants more easily compared to watering by bucket, while requiring much less infrastructure than constructing irrigation dams and pipes.
What is THE GRAIN CRUSHER?
Answer:
Grain crusher is used to crush various kinds of grains, peas, buckwheat, beans, corn, linseed seeds and etc. Crushed grains are usually used to feed ruminant animals. Crushed grain are easier to digest, nutrients are assimilated more easily. Suitable as simply pellets chrusher.
How do most benchmark tests measure the performance of a graphic card
Answer:
Using Frame Rate
Explanation:
Most benchmark tests measure the performance of a graphic card by using "Frame Rate"
This is because using Frame Rate assesses and then measures the number of images a GPU (graphic processing unit) can render and at the same time the number of images that are being shown on a monitor or screen per second.
Hence, in this case, the correct answer is "Frame Rate"
Write a program that has the user input how many classes they are taking this semester and then output how many hours they will need to study each week. Assume that they need to study five hours per week for each class that they take.
This is for Python
class_amt = int(input('Amount of Classes: '))
hours = class_amt * 5
print(f'You need to study for {hours} hours every week')
The program that has the user input on how many classes they are taking this semester is written in python.
What is programming?Writing code to support certain activities in a computer, application, or software program and giving them instructions on how to do is known as computer programming.
It is well known that one of the hardest subjects to master is programming. It is not difficult to understand why some people find it challenging to learn how to code given how different it is from conventional educational methods, including college degrees in computer science. In general, programming is a calm profession.
class_amt = int(input('Amount of Classes: '))
hours = class_amt * 5
print(f'You need to study for {hours} hours every week')
Therefore, the codes are written above.
To learn more about programming, refer to the link:
https://brainly.com/question/16850850
#SPJ2
An entrepreneur wants to make an app to show what breeds of dogs are similar to each other. She wants to look at factors such as weight and energy level in her comparison. In the end, she wants each breed of dog to belong to a certain category based on these characteristics. What would be a sensible approach to solving this problem using clustering?
Answer
Dog breeds = observations, Average weight and energy level for each breed = variables. Each cluster is a category.
Explanation:
Using a method of clustering, she would be putting the dog breeds that are more similar together and in order to do this she has to look at various factors such as observation which are the dog breeds, and the average weight and energy level of the breeds, which represents variables. Every one of these clusters would be a category.
Which one is better AMD Ryzen 5 Or Nvidia Gtx 2080 ti
Answer:
The NVIDIA GTX 2030 Ti
Explanation:
The AMD Ryzen 5 is good for a starting gaming PC, but if you are looking for a gaming PC that could run a lot more games, use the NVIDIA GTX 2080 Ti.
The Binary Search algorithm works by testing a mid-point, then eliminating half of the list.
a. True
b. False
Answer:
a. True
Explanation:
The Binary Search algorithm works by testing a mid-point, then eliminating half of the list.
Which of the following statements is true for DMA: (only one correct answer) A. In DMA, Processor checks status until the operation is complete B. In DMA, Processor is interrupted when I/O module ready to execute data C. In DMA, no interrupt is produced D. In DMA, interrupt is sent when the task is completed E. None of the above
Answer:
D. In DMA, interrupt is sent when the task is completed
Explanation:
Note, the term Direct Memory Access simply refers to a computer feature that allows hardware subsystems to directly access the main system memory of a computer, without any the aid of the central processing unit (CPU).
It is a fact that while the transfer process is ongoing, an interrupt (interrupt signal) is not sent until when the task is completed.
Why must a mobile application be easily customized and personalized?
Answer:
Explanation:
An app is a way to bring your consumer closer to your products or services. It allows customers to easily interact and make transactions without physical limitations. To have positive results, it's important that the app has a focus on user usability and navigability.
Answer:
I don't know Roxy -w-
Explanation:
The base class Pet has private fields petName, and petAge. The derived class Dog extends the Pet class and includes a private field for dogBreed. Complete main() to:
• create a generic pet and print information using printInfo()
• create a Dog pet, use printInfo() to print information, and add a statement to print the dog's breed using the getBreed() method.
Ex. If the input is:
Dobby
2
Kreacher
3
German
Schnauzer
the output is:
Pet Information:
Name: Dobby
Age: 2
Pet Information:
Name: Kreacher
Age: 3
Breed: German Schnauzer
Answer:
Explanation:
The following code is written in Java and creates the needed code within the main method in order to get the desired output as shown in the example. It also added The proper questions so that the user can know what type of information they should type in.
import java.util.Scanner;
public class PetInformation {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
String petName, dogName;
String dogBreed = "null";
int petAge, dogAge;
Pet myPet = new Pet();
System.out.println("Enter Pet Name:");
petName = scnr.nextLine();
System.out.println("Enter Pet Age:");
petAge = scnr.nextInt();
Dog myDog = new Dog();
System.out.println("Enter Dog Name:");
dogName = scnr.next();
System.out.println("Enter Dog Age:");
dogAge = scnr.nextInt();
scnr.nextLine();
System.out.println("Enter Dog Breed:");
dogBreed = scnr.nextLine();
System.out.println(" ");
myPet.setName(petName);
myPet.setAge(petAge);
myPet.printInfo();
myDog.setName(dogName);
myDog.setAge(dogAge);
myDog.setBreed(dogBreed);
myDog.printInfo();
System.out.println(" Breed: " + myDog.getBreed());
}
}
class Pet {
protected String petName;
protected int petAge;
public void setName(String userName) {
petName = userName;
}
public String getName() {
return petName;
}
public void setAge(int userAge) {
petAge = userAge;
}
public int getAge() {
return petAge;
}
public void printInfo() {
System.out.println("Pet Information: ");
System.out.println(" Name: " + petName);
System.out.println(" Age: " + petAge);
}
}
class Dog extends Pet {
private String dogBreed;
public void setBreed(String userBreed) {
dogBreed = userBreed;
}
public String getBreed() {
return dogBreed;
}
}
10. List three adaptations of wind-pollinated plants to promote pollination.
Answer:
No bright colors, special odors, or nectar.
Small.
Most have no petals.
Peyton is taking a part-time job to earn some extra money. Every week the manager will provide a list of tasks and the number of hours each task requires. The tasks have to be done one by one from the first one and Peyton would do so until the time spent on all finished tasks exceeds 10 hours. Please construct a function take_tasks, which takes one integer list as the argument task_hours and prints out how many hours and how many tasks Peyton would do for that week. For example, the program below
tasks ([2, 1, 3, 1, 4, 2, 3])
will have the following output:
Finish 5 tasks in 11 hours
Note: you can use enumerate() to get the index of the task, which is available after the for loop terminates. However, keep in mind that index starts from 0.
time_spent = 0
time_spent = 10
if time_spent > 10: break
if time_spent > 0: break
for index, hour in task_hours:
print('Finish {} tasks in {} he
if time_spent == 10: break
def take_tasks (task_hours):
time_spent += index
time_spent += hour
for index, hour in enumerate
Answer:
The function is as follows:
def tasks(Petyontasks):
timespent = 0
for i, tsk in enumerate(Petyontasks):
if timespent<=10:
timespent+=tsk
else:
break
print("Finish "+str(i)+" tasks in "+str(timespent)+" hours")
Explanation:
The program in the question cannot be traced. Hence, the need to begin from scratch.
This defines the function
def tasks(Petyontasks):
This initializes timespent to 0
timespent = 0
This iterates through the tasks [i represents the count of the tasks while tsk represents the time on each task]
for i, tsk in enumerate(Petyontasks):
If timespent is less or equal to 10
if timespent<=10:
The tasks is added and the timespent is calculated
timespent+=tsk
If otherwise
else:
The loop is exited
break
This prints the required output
print("Finish "+str(i)+" tasks in "+str(timespent)+" hours")
Read the scenario and then choose which type of report it describes.
A salesperson searches the inventory list to find out whether a specific product is in stock.
customer list
market-research report
product list
sales-volume report
Answer:
C) product list
Explanation:
i read the coments above XD
plus im takeing the test rn
Answer:
Next one D
Explanation:
Write a program to prompt the user to enter a fist name, last name, student ID and GPA. Create a dictionary called Student1 with the data. Repeat this for three students and create Student2 and Student3 dictionaries. Store the three students dictionaries to a new dictionary called ClassList. (ClassList will have Student1, Student2 and Student3 as sub dictionaries). Print out the ClassList. Then remove the GPA and print ClassList again.
Answer:
Answered below
Explanation:
#Program is written in Python
first_name = input ("Enter first name: ")
last_name = input ("Enter last name:")
student_id = int(input("Enter your ID"))
gpa = float(input ("Enter your GPA: "))
student1 = {}
student1["first_name"] = first_name
student1["last_name"] = last_name
student1["student_id"] = student_id
student1["gpa"] = gpa
//Repeat same code for student2 and student3
class_list = {"student1": {"first_name":"joy","last_name":"Son","student_id":"1","gpa":"3.5"},
#Fill in for student 2 and 3}
#To remove GPA for all students
del class_list["student1"]["gpa"]
del class_list["student2"]["gpa"]
del class_list["student3"]["gpa"]
print(class_list)
third mean between two numbers 27 and 1 by 27 is 1 find the number of means
Answer:
third mean between two numbers 27 and 1 by 27 is 1 find the number of means
Explanation:
Consider the following class definitions. public class Computer { private String memory; public Computer) { memory = "RAM"; } public Computer (String m) { memory = m; } public String getMemory () { return memory; ) } public class Smartphone extends Computer private double screenWidth, screenHeight; public Smart Phone (double w, double h) super("flash"); screenWidth = w; screenHeight = h; } public double get ScreenWidth() { return screenWidth; } public double getScreenHeight() { } return screenHeight; } The following code segment appears in a class other than Computer or Smartphone. + Computer myPhone = new Smart Phone (2.55, 4.53); System.out.println("Device has memory: " + myPhone.getMemory () ", screen area: " + myPhone.getScreenWidth()* myPhone.getScreenHeight() + " square inches."); The code segment is intended to produce the following output. Device has memory: flash, screen area: 11.5515 square inches. Which of the following best explains why the code segment does not work as intended?A. An error occurs during compilation because a Smartphone object cannot be assigned to the Computer reference variable myPhone. B. An error occurs during compilation because the Smartphone class has no getMemory method. C. An error occurs during compilation because the getScreenWidth and getScreenHeight methods are not defined for the Computer object myPhone. D. An error occurs at runtime because the Smartphone class has no getMemory method. E. An error occurs at runtime because the getScreenWidth and getScreenHeight methods are not defined for the Computer object myPhone.
Answer:
C.
Explanation:
The code provided in the question has many syntax errors. I have pasted a fixed version of the code below that fixes all the syntax errors but leaves the code as is. Using this code you can see that the error that is preventing the code from running properly is that
C. An error occurs during compilation because the getScreenWidth and getScreenHeight methods are not defined for the Computer object myPhone.
As you can see from the attached photo below, the code is failing to compile because the methods themselves are not able to be accessed by the myPhone object. This is happening during the compilation and thus causing the compilation to fail.
class Computer {
private String memory;
public Computer() {
memory = "RAM";
}
public Computer(String m) {
memory = m;
}
public String getMemory() {
return memory;
}
}
class Smartphone extends Computer {
private double screenWidth, screenHeight;
public Smartphone(double w, double h) {
super("flash");
screenWidth = w;
screenHeight = h;
}
public double getScreenWidth() {
return screenWidth;
}
public double getScreenHeight() {
return screenHeight;
}
}
public class Main{
//The following code segment appears in a class other than Computer or Smartphone
public static void main(String[] args) {
Computer myPhone = new Smartphone(2.55, 4.53);
System.out.println("Device has memory: " + myPhone.getMemory() + ", screen area: " + (myPhone.getScreenWidth()*myPhone.getScreenHeight()) +" square inches.");
}
}
The choice is "The getScreenWidth and getScreenHeight methods again for Computer object myPhone aren't declared, resulting in an error during compilation".
Class Description:In Options D and E errors would not occur since only compile-time errors, not run-time errors, would happen.Computer myPhone = new Smartphone(2.55,4.55);
A computer class was referenced by myPhone in this line. As a consequence, it's solely useful for computer students. Therefore, if you try to use the "getScreenwidth" and "getScreenHeight" functions of both the Smartphone class, which would be a sub-class of the Smartphone, you'll get an error. So, because the scope of the myPhone is limited to the parent class, the computer, it complies.Choices A and B will not produce an error since they are inside the scope of the myPhone.As a result, option C is the best argument for why the code section isn't working as it should.Find out more about the class here:
brainly.com/question/17001900
01110100 01101000 01101001 01110011 00100000 01110011 01110101 01100011 01101011 01110011 00100000 01100010 01100001 01101100 01101100 01110011 00100000 01110101 00100000 01100010 01101001 01110100 01100011 01101000 01100101 01110011
Answer:
01110101 01101110 01101111 00100000 01110010 01100101 01110110 01100101 01110010 01110011 01100101 00100000 01100011 01100001 01110010 01100100 00100000 01000010 01000101 01010100 01000011 01001000
Select the correct word to complete the sentence.
Bandwidth represents the _____ of a connection.
capacity
speed
distance
security
Answer:
Capacity
Explanation:
i got it wrong and it showed this to be the answer on edge
Which descnptons are examples of Logistics Planning and Management Services workers? Check all that apply.
a. Lucreta supervises workers who organize the products in a warehouse b. Jeff organizes the redevelopment of areas contaminated by pollution.
c. Beatrice sells tickets to passengers for trips, and advises them about travel routes
d.Stephane inspects vencies and equipment to make sure they meet safety standards
d. Marcel oversees the transportation activities of an organization
e. Armand analyzes procedures for shipping and storage to identify ways to make them more efficient.
Answer:
The following below are descriptions of Logistics Planning and Management Services workers:
a. Lucreta supervises workers who organize the products in a warehouse
c. Beatrice sells tickets to passengers for trips, and advises them about travel routes
d.Stephane inspects vencies and equipment to make sure they meet safety standards
d. Marcel oversees the transportation activities of an organization
Explanation: