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
Information Technology
Answer:
whats the question
Explanation:
Answer: The study or use of systems. Especially computers and telecommunications for storing, retrieving, and sending information.
Explanation: I don't know what you're asking buddy. If you're asking for the definition then there you go. Next time add the question :)
Can someone help me calculate this Multimedia math:
A monochrome sequence (black and white) uses a frame size of 176 x 144 pixels and has 8 bits/pixels. Registered with Frame Rate 10 frames/sec. Video is transmitted through a 64 Kbit/sec bandwidth line.
(a) Calculate Compression Ratio (Crude Bit Speed / Compressed Bit Speed) which will be needed.
(b) What will happen if the Ratio compression is higher than it in (a)?
(c) What will happen if the Ratio compression is lower than it in (a)?
Answer:
I will try to help you answer this. it seems really confusing but I'll do my best to solve it and get it back to you. Hope I'm able to help!
Where should a photographer place lights for a headshot? Headshot lighting is more important with darker backgrounds. The light should be at a 45-degree angle from the subject. The light should be in front of the subject. The third light should be the subject to form a ring of light around the subject’s hair.
Answer:
Headshot lighting is more important with darker backgrounds. The
(key) light should be at a 45-degree angle from the subject. The
(fill) light should be in front of the subject. The third light should be
(behind) the subject to form a ring of light around the subject’s hair.
Explanation:
i searched it up individually and thats what i got
yes how many poly pockets if I had 10 and gave 2 to esmeraldas father who died and left 1 to his cat, sir whisker?
Answer:
Total 13 poly packets are there
Explanation:
Total number of poly packets = 10
Number of poly packets given to esmeraldas father = 2
Number of poly packets left with his cat = 1
Total remaining poly packets = 10 + 2 + 1 = 10 + 3 = 13
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
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
Hoda is creating a report in Access using the Report Wizard. Which option is not available for adding fields using the wizard?
1. Tables
2. Queries
Reports
All are available options.
Answer:
Reports
Explanation:
Answer:
reports
Explanation:
convert 128 GB into KB
Answer:
1,073,741,274 KB
Explanation:
Use an unit convertor or an calculator.
PLZ HELP !!!!!
plzzzz
Answer:
Producers
Explanation:
Producers manufacture and provide goods and services to consumers.
function _one(array)
Create a JavaScript function that meets the following requirements:
•
•
•
•
Please give your function a descriptive name
o ( _one is not acceptable, and is only displayed here for illustration purposes)
Receives an array of integers as an argument
The function removes all duplicates (if they exist) from the array and returns it to the caller.
Assume the input array parameter will have at least one element in it.
Examples :
_one([33])
➔ [33]
_one([33, 33, 1, 4])
➔ [1, 4]
_one([33, 33, 1, 4, 1]) ➔ [4]
Answer:
function removeRepeaters(list){
var goodList = [], badList = {}, used = {}, n;
// ensure that the argument is indeed an array
if(!Array.isArray(list)){
throw "removeRepeaters: Expecting one argument of type Array";
}
// loop through the array and take note of any duplicates
for(n in list) used[list[n]] == true ? badList[list[n]] = true : used[list[n]] = true;
// now loop through again, and assemble a list of non-duplicates
for(n in list) if(badList[list[n]] == undefined) goodList[] = list[n];
return goodList;
}
Explanation:
I assume you're familiar with trinary operators, but just in case, that's what's happening in this first for loop:
for(n in list) used[list[n]] == true ? badList[list[n]] = true : used[list[n]] = true;
this is the same as saying:
for(n in list){
if(used[list[n]] == true){
badList[list[n]] = true;
} else {
used[list[n]] = true;
}
}
This loop flags all of the values in the list that are duplicated. Note that both "badList" and "used" are declared as objects instead of arrays. This allows us to compare keys in them with an == operator, even if they're not defined, making it a convenient way to flag things.
Note that I haven't tested it, so I may have overlooked something. I suggest testing it before handing it in.
Wesley purchased a word-processing software program. He used it for a year, during which he got regular updates every two months. After a year, he was not allowed to update the software. However, he could continue using it. Why did the updates stop?
Group of answer choices.
A. The software was corrupt and resulted in a bug.
B. He purchased a license with maintenance for a year.
C. The organization discontinued the software.
D. He purchased an open-source license.
E. He purchase a perpetual non-maintenance license.
Answer:
B. He purchased a license with maintenance for a year.
Explanation:
A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.
Basically, softwares are categorized into two (2) main categories and these are;
I. Open-source software.
II. Proprietary software.
A proprietary software is also known as a closed-source software and it can be defined as any software application or program that has its source code copyrighted and as such cannot be used, modified or distributed without authorization from the software developer. Thus, it is typically published as a commercial software that may be sold, licensed or leased by the software developer (vendor) to the end users with terms and conditions.
In this scenario, Wesley purchased a word-processing software program. He used it for a year, during which he got regular updates every two months. However, after a year, he was not allowed to update the software but he could continue using it.
This ultimately implies that, Wesley purchased a licensed software with maintenance for a year and as such he would stop receiving an update from the software developer after his subscription expired.
Write a method that reverses the sequence of elements in an array. For example, if you call the method with the array g
Helllp me you will git 16 points
Answer:
False
Hope it helps...
Have a great day :P
What are the characteristics of a good text-based adventure game? In other words, what are some features that should be in the game to make it appealing to players?
Answer:
spelling and good format
Explanation:thats all i know
paisa pay is facilitated in which e commerce website
Answer:
The answer is "Option A".
Explanation:
The PaisaPay is the digital payment service of eBay, whereby buyers can pay sellers through credit card or Online Money Order. For quick, safe transactions or their cash back, their buyers must use PaisaPay. So, it is easier to go to eBay.co.in, was its digital payment service of eBay, whereby purchasers can charge vendors by credit card or Online Bank Transfer.
c Write a recursive function called PrintNumPattern() to output the following number pattern.Given a positive integer as input (Ex: 12), subtract another positive integer (Ex: 3) continually until 0 or a negative value is reached, and then continually add the second integer until the first integer is again reached.
Answer:
def PrintNumPattern(a,b):
print(a)
if (a <= 0): return
PrintNumPattern(a-b,b)
print(a)
PrintNumPattern(12,3)
Explanation:
Recursive functions are cool.
What element of art does this photograph show? A. shape B. space C. form D. tone E. line
I would for sure say form because it doesn't look like a flat surface, instead it looks 3-D, but If it is multiple choice then I say do C,D, and E.
Here is some advice tho, this question seems like an opinion question, soo, that means that you pick one that stands out to you and escribe why you think so in a descriptive way... if that is not the case then go ahead and use whatever i gave you. Just in case you may want to add a little more to the bolded answer I gave you, just to be professional, in case you do want to add more here is the defintion of form in case you need it
In addition to form, they include line, shape, value, color, texture, and space. As an Element of Art, form connotes something that is three-dimensional and encloses volume, having length, width, and height, versus shape, which is two-dimensional, or flat.
If this helps, I would like brainliest, when possible
8.10 Code Practice: Question 2
Edhesive
Answer:vocab = ["Libraries", "Bandwidth", "Hierarchy", "Software", "Firewall", "Cybersecurity","Phishing", "Logic", "Productivity"]
print (vocab)
for i in range (1, len (vocab)):
count = i - 1
key = vocab[i]
while (vocab[count] > key) and (count >= 0):
vocab[count+1] = vocab[count]
count -= 1
vocab [count+1] = key
print(vocab)
Explanation: bam baby
In this exercise we have to use the knowledge of the python language to write the code, so we have to:
The code is in the attached photo.
So to make it easier the code can be found at:
vocab = ["Libraries", "Bandwidth", "Hierarchy", "Software", "Firewall", "Cybersecurity","Phishing", "Logic", "Productivity"]
print (vocab)
for i in range (1, len (vocab)):
count = i - 1
key = vocab[i]
while (vocab[count] > key) and (count >= 0):
vocab[count+1] = vocab[count]
count -= 1
vocab [count+1] = key
print(vocab)
See more about python at brainly.com/question/26104476
1. Define Primary Key. Why do we need primary key ?
2. Define Field size.
3. Define Validation Rule.
4. . Not leaving the house and a lack of exercise can cause health problems like obesity. TRUE OR FALSE
5. Rebecca only works 3 days in a week but she works longer hours each day to ensure she hits the 40-hour work week.
-art-time working
-Compressed hours
-Job sharing
-Flexible hour
Answer:
1 .The main purpose of primary key is to identify the uniqueness of a row, where as unique key is to prevent the duplicates, following are the main difference between primary key and unique key.
Explanation:
2. Field size means the dimensions along the major axes of an area in a plane perpendicular to the central axis of the useful beam of incident radiation at the normal treatment distance and defined by the intersection of the major axes and the 50 percent isodose line.
Define a function named sum_values with two parameters. The first parameter will be a list of dictionaries (the data). The second parameter will be a string (a key). Return the sum of the dictionaries' values associated with the second parameter. You SHOULD NOT assume that all of the dictionaries in the first parameter will have the second parameter as a key. If none of the dictionaries have the second parameter as a key, your function should return 0. Sample function call: sum_values(data, 'estimated_annual_kwh_savings') sum_values_by_year
Answer:
Answered below
Explanation:
//Program is written in Python
sum = 0
def sum_of_values(dict_data, number_of_boys):
for dict in dict_data:
for key in dict.keys():
if key == number_of_boys:
sum += dict[key]
//After looping check the sum variable and //return the appropriate value.
if sum != 0:
return sum
elif sum == 0:
//There was no key of such so no addition.
return 0
You are asked to write a program that will display a letter that corresponds with a numeric rating system. The program should use a switch statement. The numeric rating is stored in a variable named rate and rate may equal 1, 2, 3, or 4. The corresponding letter is stored in a variable named grade and grade may be A, B, C, or D. Which is the test expression for this switch statement
The switch statements are similar to the if statements in a computer program
The test expression for the switch statement is the variable rate
How to determine the test expressionFrom the question, we have the following highlights
The program displays a corresponding letter of a rateThe rating is stored in the variable rateThis means that, the numerical value of the variable rate would be tested and the corresponding letter would be printed
Hence, the test expression for the switch statement is the variable rate
Read more about computer programs at:
https://brainly.com/question/16397886
Sites like Zillow get input about house prices from a database and provide nice summaries for readers. Write a program with two inputs, current price and last month's price (both integers). Then, output a summary listing the price, the change since last month, and the estimated monthly mortgage computed as (currentPrice * 0.051) / 12 (Note: Output directly. Do not store in a variable.). Ex: If the input is: 200000 210000 the output is: This house is $200000. The change is $-10000 since last month. The estimated monthly mortgage is $850.0. Note: Getting the precise spacing, punctuation, and newlines exactly right is a key point of this assignment. Such precision is an important part of programming.
Answer:
In Python:
cprice= int(input("Current price: "))
lmonth= int(input("Last month's price: "))
print("This house is $"+str(cprice))
print("The change is $"+str(cprice-lmonth)+" since last month")
print("The current mortage $"+str((cprice * 0.051) / 12)+" since last month")
Explanation:
Get current price
cprice= int(input("Current price: "))
Get last month's price
lmonth= int(input("Last month's price: "))
Print the current price
print("This house is $"+str(cprice))
Print the change
print("The change is $"+str(cprice-lmonth)+" since last month")
Print the mortgage
print("The current mortage $"+str((cprice * 0.051) / 12)+" since last month")
Create two functions (with appropriate names) that produce the output below. Both functions must use a prototype. All that should be present in main() is the call to these two functions and a blank line of output between the function calls. This is a very easy exercise. Focus on the fundamentals. Make sure you review my solution file to make sure your syntax and name choice is good. Output: This is the first part of my program. It was created with a function. <-- These two lines are output by the first function This is the second part of my program. It was created with a different function. <-- These two lines are output by the second function
Answer:
In C++:
#include <iostream>
using namespace std;
void function1(); void function2();
int main(){
function1(); function2();
return 0;}
void function1(){
cout<<"This is the first part of my program."<<endl<<"It was created with a function"<<endl;}
void function2(){
cout<<"This is the second part of my program."<<endl<<"It was created with a different function.";}
Explanation:
This defines the function prototypes
void function1(); void function2();
The main begins here
int main(){
This calls the two functions from main
function1(); function2();
return 0;}
This calls function1()
void function1(){
cout<<"This is the first part of my program."<<endl<<"It was created with a function"<<endl;}
This calls function2()
void function2(){
cout<<"This is the second part of my program."<<endl<<"It was created with a different function.";}
What programming language does the LMC 'understand'?
Answer:
The LMC is generally used to teach students, because it models a simple von Neumann architecture computer—which has all of the basic features of a modern computer. It can be programmed in machine code (albeit in decimal rather than binary) or assembly code.
Which wizard is a tool provided by Access that is used to scan the table's structure for duplicate?
O Query Design Wizard
O Table Design Wizard
O Table Analyzer Wizard
O Performance Analyzer Wizard
Answer:
The tool provided by access that’s used to scan the table’s structure for duplicate is “Table Analyzer Wizard”.
How can a user restore a message that was removed from the Deleted Items folder?
by dragging the item from Deleted Items to the Inbox
by dragging the item from Deleted Items to Restored Items
by clicking on "Recover items recently removed from this folder"
by clicking on the Restore button in the Navigation menu
Answer:
by clicking on "Recover items recently removed from this folder".
Answer:
c
Explanation:
See the picture and answer the coding question
Answer:
Actually I don't know computer so I can't help you sorry bro
3.5.6 Introduce Yourself, Part 2
please hellllpp it keeps saying the code is wrong
Answer:
In Python:
name = "Arthur"
age = "62"
print("Hi! My name is "+name+" and I am "+age+" years old")
Explanation:
Given
See attachment
Required
Write a code to introduce yourself
Initialize name
name = "Arthur"
Initialize age
age = "62"
Print introduction
print("Hi! My name is "+name+" and I am "+age+" years old")
a farmer cultivates 1/4 of his farm with ground nuts and 2/5 of it with maize what is the total landnarea that is cultivated
Answer:
13/20
egeringioerngierngineriogneirognoernogenroiernonoirenogneogneiong
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.