Answer:
Explanation:
The following code is written in Java and creates the constructor for the Dictionary class as requested. This class extends the Book class and assumes that the variables for the title and the cost are part of the Book class, so it simply calls and initializes them using the constructor.
class Dictionary extends Book {
int numberWords;
public void Dictionary(String title, int cost, int numberWords) {
this.title = title;
this.cost = cost;
this.numberWords = numberWords;
}
}
Task #3 Debugging a Java Program
1. Copy the file Sales Tax.java (see Code Listing 1.2) from the Student CD or as directed by your instructor.
2. Open the file in your IDE or text editor as directed by your instructor. This file contains a simple Java program that contains errors. Compile the program. You should get a listing of syntax errors. Correct all the syntax errors, you may want to recompile after you fix some of the errors.
3. When all syntax errors are corrected, the program should compile. As in the previous exercise, you need to develop some test data. Use the chart below to record your test data and results when calculated by hand.
4. Execute the program using your test data and recording the results. If the output of the program is different from what you calculated, this usually indicates, a logic error. Examine the program and correct any logic errors. Compile the program and execute using the test data again. Repeat until all output matches what is expected?
Item Price Tax Total (calculated) Total (output)
Code Listing 1.2 (SalesTax.java)
import java.util.Scanner; // Needed for the Scanner class
/**
This program calculates the total price which includes sales tax.
*/
public class Sales Tax
{
public static void main(String[] args)
{
// Identifier declarations
final double TAX_RATE = 0.055;
double price;
double tax
double total;
String item;
// Create a Scanner object to read from the keyboard.
Scanner keyboard = new Scanner(System.in); ");
// Display prompts and get input.
System.out.print("Item description:
item= keyboard.nextLine();
System.out.print("Item price: $");
price - keyboard.nextDouble();
// Perform the calculations.
tax = price + TAX_RATE;
totl - price* tax;
// Display the results.
System.out.print (item + " $");
System.out.println(price);
System.out.print("Tax $");
System.out.println(tax);
System.out.print("Total $");
System.out.println (total);
}
}
Answer:
import java.util.Scanner;
public class SalesTax
{
public static void main(String[] args)
{
// Identifier declarations
final double TAX_RATE = 0.055;
double price;
double tax;
double total;
String item;
// Create a Scanner object to read from the keyboard.
Scanner keyboard = new Scanner(System.in);
// Display prompts and get input.
System.out.print("Item description:");
item= keyboard.nextLine();
System.out.print("Item price: $");
price = keyboard.nextDouble();
// Perform the calculations.
tax = price + TAX_RATE;
total = price + tax;
// Display the results.
System.out.print (item + " $");
System.out.println(price);
System.out.print("Tax $");
System.out.println(tax);
System.out.print("Total $");
System.out.println (total);
}
}
Explanation:
A company has created a form that will be used to submit quarterly earnings. The form is created in a workbook. How should it be saved so that all employees can open this form, input their data, and turn it in?
It should be saved as an Excel workbook.
It should be saved as XML data.
It should be saved as an Excel template.
It should be saved as a web page.
How would you write this using Java: Use a TextField's setText method to set value 0 or 1 as a string?
Answer:
Explanation:
The following Java code uses JavaFX to create a canvas in order to fit the 10x10 matrix and then automatically and randomly populates it with 0's and 1's using the setText method to set the values as a String
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.stage.Stage;
public class Main extends Application {
private static final int canvasHEIGHT = 300;
private static final int canvasWIDTH = 300;
public void start(Stage primaryStage) {
GridPane pane = new GridPane();
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
TextField text = new TextField();
text.setText(Integer.toString((int)(Math.random() * 2)));
text.setMinWidth(canvasWIDTH / 10.0);
text.setMaxWidth(canvasWIDTH / 10.0);
text.setMinHeight(canvasHEIGHT / 10.0);
text.setMaxHeight(canvasHEIGHT / 10.0);
pane.add(text, j, i);
}
}
Scene scene = new Scene(pane, canvasWIDTH, canvasHEIGHT);
primaryStage.setScene(scene);
primaryStage.setMinWidth(canvasWIDTH);
primaryStage.setMinHeight(canvasHEIGHT);
primaryStage.setTitle("10 by 10 matrix");
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
which benefit does the cloud provide to star-up companies without access to large funding?
Explanation:
Start-up companies can store, manage, process data and use programs through a web-based interface – something that greatly reduces costs. Data stored in the cloud can be accessed from anywhere through various devices with web connectivity, which is an advantage for small companies that don't have a huge IT budget.
Cloud provides storage access and management for files and information using a the cloud computing provider. This could help reduce the cost expended on physical content storage devices.
The cost of purchasing storage devices to habor information and data may be daunting for new startups with little capital. The cloud computing framework is a cheaper alternative, yet provides easier accessibility at all times.Hence, the cloud could in the cost expended on physical storage.
Learn more : https://brainly.com/question/22841107
If you were able to earn interest at 3% and you started with $100, how much would you have after 3 years?
109
A= Amount+ interest *sb
interest=P×r×t/100
100×3×3/100
100 cancel 100=3×3=$9
100+9=109
"Why do the linked stack and queue implementations not include iterators, as in the linked list classes of Chapter 16? Are there cases in which a stack or queue might need to be traversed privately, even if access cannot be provided publicly? If so, should an iterator be used for these cases?"
Answer:
Explanation:
A linked stack is a LIFO (last in, first out) while a queue is a FIFO (first in, first out) data structure. This means that you can only access and modify the first or last elements of the stack or queue repectively. Therefore, there is no use for iterators in such a data structure which is why they do not exist. Iterators are mainly for traversing sequential access or random access within the given data structure which is not possible with these data structures, but is possible with lists. A stack or queue would either be made automatic so that it is completely private or simply made public so that it can be accessed by other methods and classes, regardless iterators would not be used.
Based on the description below which website is more appropriate
A. a site that asks you to send $10 to help schoolchildren in Uganda
B. a site that describe violent behavior
C. a site that asks for your personal information to win a contest for a new bike
D. a site sponsored by a government agency that gives you factual information
Answer:
D
Explanation:
Answer:
The answer is d
Explanation:
because asking for 10 dollars is the first website is not normal and in the second describing violent behavior is not ok and the third asking for personal information for a free bike is not good but d a site sponsored giving you factual information that made by the government is trustworthy
State and explain five misused of science and technology
Answer:
1. Perpetration of violence
2. Breach of privacies
3. Replacement of human labor
4. National threats
5. Devotion of excessive time to technologies
Explanation:
The advent of science and technology have come with lots of benefits to man. Some of these benefits include, the invention of phones, electricity, the internet and social media, satellites, drones, etc. However, science and technology have been misused in the following ways;
1. Perpetration of violence: Weapons of war have caused the mass destruction of more people than was obtainable before. To aid these activities the fast means of communication and transportation cause seamless operations.
2. Breach of privacies: People with technical knowledge have the ability to intrude into the privacies of others. They can obtain information that was not originally meant for them.
3. Replacement of human labor: Machines and equipment have reduced the number of humans that were gainfully employed prior to the advent of these technologies.
4. National threats: Nations and governments now threaten their counterparts with the deployment of missiles. These attitudes aid international conflicts.
5. Devotion of excessive time to technologies: Teenagers most especially have developed an overdependence on technologies. A lot of time is now spent on phones, thus causing the neglect of social relationships.
Synchronization barriers are a common paradigm in many parallel applications.
a. True
b. False
Answer:
I am not sure on this one I am guessing it is True
Explanation:
how can you hack on a cumputer witch one chrome hp
Answer:
http://www.hackshop.org/levels/basic-arduino/hack-the-chromebook
Explanation:
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
yes
the device that store data and program for current purpose
Answer:
A computer, what you are using. smh.
Answer:
Podría ser el teléfono porque puedes almacenar imágenes de datos depende del almacenamiento interno que pueda contener el dispositivo no.
Explanation:
Por ejemplo en este tiempo depende mío puede almacenar la clases miércoles y 3 cosas de aprendizaje y la formación de nuevas personas con valores y virtudes en el ámbito social político y económico.
Gracias.
#cuidemonosdesdecasa.
what will you recommend to HP Mini 5103 Notebook?
jo.in Goo.gle meet the code/rhk-rvet-tdi
Answer:
nah
Explanation:
cuz ion wanna
What is the most common representation of a distribution?
Pie Chart
Table
Histogram
Bar Chart
Which of the following are examples where AI is now used in daily life? Select all that apply.
Group of answer choices
professional wrestling
video game development
banking and financial services
postal and shipping services
customer service industry
Yoga
Answer:
Video game development .
Banking and financial services.
Postal and shipping services.
Customer service industry.
Explanation:
Artificial Intelligence is called the set of computer programs that, inserted in certain objects or systems, automate processes in such a way that they carry out certain actions in an "intelligent" way, that is, processing different variables through algorithms to respond correctly to the user need.
A clear example of artificial intelligence occurs in the case of homebanking, where a person can transfer money from their bank account through a mobile application that manages their bank account remotely.
Write a program that repeatedly reads in integers until a negative integer is read. The program keeps track of the largest integer that has been read so far and outputs the largest integer when the (first) negative integer is encountered. (See subsection Example: Finding the max value of section 4.1 Loops (general) to practice the algorithm).
Answer:
In Python:
num = int(input("Enter number: "))
maxn = num
while num >=0:
if num>maxn:
maxn = num
num = int(input("Enter number: "))
print("Largest: "+str(maxn))
Explanation:
Get input from the user
num = int(input("Enter number: "))
Initialize the largest to the first input
maxn = num
This loop is repeated until a negative input is recorded
while num >=0:
If the current input is greater than the previous largest
if num>maxn:
Set largest to the current input
maxn = num
Get another input from the user
num = int(input("Enter number: "))
Print the largest
print("Largest: "+str(maxn))
Scenario
You are the IT administrator for a small corporate network. You're repairing the computer in the Support Office, which appears to have a failed power supply. After testing the power supply and confirming the failure, you removed it from the computer. Now you need to select a replacement power supply. In this lab, your task is to complete the following: Install a power supply based on the following requirements:
The power supply must have the appropriate power connectors for the motherboard and the CPU. Make sure the power supply you select will support adding a graphics card that requires its own power connector.
Make the following connections from the power supply:
Connect the motherboard power connector.
Connect the CPU power connector.
Connect the power connectors for the SATA hard drives.
Connect the power connector for the optical drive.
Plug the computer in using the existing cable plugged into the power strip.
Turn on the power supply. Start the computer and boot into Windows.
Answer:
Explanation:
The following connections will need to be done once the power supply is fully installed inside the case and make sure to discharge any built up electricity from you body by using an anti-static bracelet if available.
Connect the motherboard power connector: This requires a 20 pin + 4 pin connector and is usually located in the middle right side of the motherboard.
Connect the CPU power connector: This requires a 4-pin connector and is located in the top right corner on most motherboards
Connect the power connectors for the SATA hard drives: These require sata cables which are small thin and flat cables and whose motherboard connectors are usually located near the motherboard power connector.
Connect the power connector for the optical drive: The power connectors are thick flat and have 4 round entry pins inside, connect this to the back of the cd-drive which should be located in the drive bay of the pc-case.
Plug the computer in using the existing cable plugged into the power strip: simply plug the computer power connector into the case and then the powerstrip
Turn on the power supply. Start the computer and boot into Windows: turn on the pc by pressing the power button and then press the F8 key on the keyboard to enter the boot options. From here choose the drive that has Windows installed on it in order to enter the Windows OS.
Agent Phil Coulson developed this program to register Avengers in S.H.I.E.L.D's database using cutting-edge programming language - Java. Complete the Avengers Registry class. Ex. if input is Steven Rogers Captain America 105 4 Then output should be: Name: Steven Rogers, Age: 105, Alias: Captain America, Security Clearance Level: 4 2892227722684 3z0y7 LAB ACTIVITY 11.6.1: miniLab: Avengers Initiative 0/10 Current file: Avengers Registry.java Load default template... 1 import java.util.Scanner; 2 Current file Avengers Registry.java Load de 1 import java.util.Scanner; 2 3 public class Avengers Registry { 4 5 6 7 8 public static Avenger createAvenger (Scanner scnr){ String name; int age; String alias, int clearance; 9 10 Avenger avenger = new Avenger(); name = scnr.nextLine(); alias = scnr.nextLine(); age = scnr.nextInt(); clearance = sonr.nextInt(); // your code here 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 return avenger; } public static void main(String[] args) { Scanner scnr = new Scanner(System.in); // your code here } File is marked as read only Current file: IndividualData.java 1 public class IndividualData { 2 private String name; 3 private int age; 4 5 public void setIndividualName(String individualName) { 6 name = individualName; 7 8 9 public String getIndividualName() { 10 return name; 11 } 12 13 14 public void setIndividualAge (int inYears) { 15 age = inYears; 16 } 17 18 public int getIndividualAge() { 19 return age; 20 } 21 22 public void printDetails() { 23 System.out.print("Name: + name); 24 System.out.print(", Age: + age) 25 } 26 H File is marked as read only Current file: Avenger.java 1 public class Avenger extends IndividualData { 2. private int securityClearance; 3 private String alias; 4 5 public void setSecurityClearance(int secLevel) { 6 securityClearance = secLevel; } 8 9 public int getSecurityClearance(){ 10 return securityClearance; 11 12 13 public void setAlias (String a) { 14 15 } 16 17 public String getAlias() { 18 return alias; 19 3 20 21 } alias = a;
eh I think yes I think. Maybe
Create a map using the Java map collection. The map should have 4 entries representing students. Each entry should have a unique student ID for the key and a student name for the element value. The map content can be coded in directly, you do not have to allow a user to enter the map data. Your program will display both the key and the value of each element.
Answer:
In Java:
import java.util.*;
public class Main{
public static void main(String[] args) {
Map<String, String> students = new HashMap<>();
students.put("STUD1", "Student 1 Name");
students.put("STUD2", "Student 2 Name");
students.put("STUD3", "Student 3 Name");
students.put("STUD4", "Student 4 Name");
for(Map.Entry m:students.entrySet()){
System.out.println(m.getKey()+" - "+m.getValue()); }
}}
Explanation:
This creates the map named students
Map<String, String> students = new HashMap<>();
The next four lines populates the map with the ID and name of the 4 students
students.put("STUD1", "Student 1 Name");
students.put("STUD2", "Student 2 Name");
students.put("STUD3", "Student 3 Name");
students.put("STUD4", "Student 4 Name");
This iterates through the map
for(Map.Entry m:students.entrySet()){
This prints the details of each student
System.out.println(m.getKey()+" - "+m.getValue()); }
An integrated circuit RAM chip has a capacity of 512 words of 8 bits each where the words are organized using a one-dimensional layout.a) How many address lines are there on the chip?b) How many such chips would be needed to construct a 4Kx16 memory?c) How many address and data lines needed for a 4Kx16 memory?#addresss lines = #data lines =
Answer:
A. 9
B. 16
C. Number of addresses = 12 number of data lines = 16
Explanation:
The capacity of this chip is 512 x 8
That is 512 words and these words have 8 bits
A. The number of the address lines would be
log2(512) = 2⁹
So the answer is 9
B. The total number of chips required
= 512 x 8 = 4096
(4096 x 2)/ 512 = 16
C. Number of address = log4092 = 2¹²
= 12
The number of data lines = 8x2 = 16
Thank you!
Write a function header for the ZooAnimal class member function daysSinceLastWeighed. This function has a single integer parameter today and returns an integer number of days since the animal was last weighed. void ZooAnimal::Destroy () { delete [] name; } // -------- member function to return the animal's name char* ZooAnimal::reptName () { return name; } // -------- member function to return the number of days // -------- since the animal was last weighed { int startday, thisday; thisday
Answer:
Answered below
Explanation:
public int daysSinceLastWeighed(int today)
Method is public which means it is visible to other classes. It returns an integer which is indicated as int. Next is the method's name which clearly describes what the method does 'days since last weighed'. The opening and closing parentheses enclose the integer parameter named today. This is the function header.
Anna has a physical mobility difference, and she uses virtual reality to complete her exercises. To use virtual reality, Anna needs to follow a specific set of steps in the correct order. What is the list of steps Anna should follow to use virtual reality?
Put the virtual glasses around her neck, complete the exercises in the virtual world, take the glasses off
Put the virtual glasses over her eyes, complete the exercises in the virtual world, take the virtual glasses off
Put the virtual glasses on her forehead, go outside, complete the exercises
Put the virtual glasses over her eyes, go to the living room, complete the exercises
Answer:
Explanation:
The basic concept of virtual reality is that they are a pair of lenses in a headset that allows you to visualize a virtual 3D world and become immersed within it. To do the exercises correctly Anna would need to follow the following basic steps.
Put the virtual glasses over her eyes, complete the exercises in the virtual world, take the virtual glasses off
The headset/glasses need to fit comfortably on her eyes and around her head so that she can clearly see the image on the lenses and so that the headset/glasses do not fall off while she is completing her exercises. Once she is done with her exercises Anna can simply take off her virtual glasses and put them away.
Write a program that first reads in the name of an input file and then reads the input file using the file.readlines() method. The input file contains an unsorted list of number of seasons followed by the corresponding TV show. Your program should put the contents of the input file into a dictionary where the number of seasons are the keys, and a list of TV shows are the values (since multiple shows could have the same number of seasons). Sort the dictionary by key (least to greatest) and output the results to a file named output_keys.txt, separating multiple TV shows associated with the same key with a semicolon (;). Next, sort the dictionary by values (alphabetical order), and output the results to a file named output_titles.txt. Ex: If the input is:
Answer:
9.2. Métodos del Objeto File (Python para principiantes)
ASAP NEED HELP ASAP NEED HELP ASAP NEED HELP ASAP NEED HELP ASAP NEED HELP ASAP NEED HELP ASAP NEED HELP ASAP NEED HELP
Answer:
10.b
11.c
12.c
13.a
14.d
15.b
16.c
Explanation:
please brainleist please ♨️❤☺️☻
For a single CPU core system equipped wiith addditional hardware modes (besides user and kernel), choose those items that are examples of the possible usage of the additional modes.
1. Data parallelism
2. Enhanced user security policy, such as user groups, so that group members may execute other group members' programs
3. Task parallelism
4. USB device driver support outside of kernel mode
Answer:
Task parallelism
Explanation:
The Task parallelism is most popularly known as the function parallelism and the control parallelism. In the computer codes, it is the form of a parallelism across the multiple processors in a parallel computing environments. It focusses on distributing the task that are concurrently performed by the threads or the processors.
For the single CPU core system that is equipped with an additional hardware modes, the task parallelism is one of the example of the usage oh a additional modes.
what are variables in Q Basic programs
Answer:
1. Numeric variable:
A variable which can store numeric value is called numeric variable.
e.g.
A=12
pi=3.14
c=79.89
2. String variable:
A variable which can store string variable is called String variable. String is a array of character enclosed within the double inverted comma.
e.g.
N$="ram"
Place$="Kirtipur Kathmandu"
note that a string variable ends with $
Explanation:
A variable is a quantity which can store value in computer memory. A variable is also a quantity whose value changes during the execution of a program. Like in mathematics a variable holds certain value Just in QBASIC; it is a placeholder for storing value in computer memory
Suppose a byte-addressable computer using set-associative cache has 2 16 bytes of main memory and a cache size of 32 blocks and each cache block contains 8 bytes. a) If this cache is 2-way set associative, what is the format of a memory address as seen by the cache; that is, what are the size of the tag, set, and offset fields
Answer:
Following are the responses to these question:
Explanation:
The cache size is 2n words whenever the address bit number is n then So, because cache size is 216 words, its number of address bits required for that cache is 16 because the recollection is relational 2, there is 2 type for each set. Its cache has 32 blocks, so overall sets are as follows:
[tex]\text{Total Number of sets raluired}= \frac{\text{Number of blocks}}{Associativity}[/tex]
[tex]=\frac{32}{2}\\\\ =16\\\\= 2^4 \ sets[/tex]
The set bits required also are 4. Therefore.
Every other block has 8 words, 23 words, so the field of the word requires 3 bits.
For both the tag field, the remaining portion bits are essential. The bytes in the tag field are calculated as follows:
Bits number in the field tag =Address Bits Total number-Set bits number number-Number of bits of words
=16-4-3
= 9 bit
The number of bits inside the individual fields is therefore as follows:
Tag field: 8 bits Tag field
Fieldset: 4 bits
Field Word:3 bits
Are brake and break pronounced the same way?
Answer:
one is correct and yes
Explanation:
B =(-21) (0) + (-50) ÷ (-5)
Answer:
B=10
Explanation:
(-21) x 0=0 and (-50)÷(-5)=10
0+10=10
Think of a routine task (studying, exam preparation, downtime, grocery shopping, food preparation, etc.) in your life that you may have never questioned. How can this routine be improved? How would this benefit you?
Answer:
Great Question
Explanation:
Think yourself and Differentiate the important tasks with the unimportant ones. You will get your answer today.