The following table describes the required fields for two classes and typical values stored in those fields.

You are required to create a base class Printer and its child class PrinterCumScanner. Each of these classes should have user defined constructor and overridden Display() method so that the following test driver can work properly.

Answers

Answer 1

Answer:

hope this helps,if it did pls mark my ans as brainliest

Explanation:

using System;

class Printer{ string companyName; int pagesOutput;

double price;

public Printer(string companyName,int pagesOutput,double price){

this.companyName=companyName; this.pagesOutput=pagesOutput; this.price=price;

}

public virtual void Display(){ Console.WriteLine("companyName: "+companyName+" pagesOutput: "+pagesOutput+" price: "+price);

}

}

class PrinterCumScanner:Printer{ int imageDpi;

public PrinterCumScanner(string companyName,int pagesOutput,double price,int imageDpi):base(companyName,pagesOutput,price){ this.imageDpi=imageDpi; }

public override void Display(){ base.Display(); Console.WriteLine("imageDpi: "+imageDpi);

}

}

public class Program { static void Main(string[] args) { const int NUM_PRINTERS=3;

Printer []stock=new Printer[NUM_PRINTERS];

stock[0]=new Printer("HP",40,89.50);

stock[1]=new PrinterCumScanner("HP",40,215.0,320); stock[2]=new PrinterCumScanner("Cannon",30,175.0,240);

foreach(Printer aPrinter in stock){ aPrinter.Display();

}

}

}


Related Questions

1. It is a technique of creating a picture or pattern by forcing ink or metal on to a surface though a screen of fine material.​

Answers

Answer:

hmm

Explanation:

I'm pretty sure it's screen painting? it's a print making method that forces ink through fine mesh

Code a complete Java program to load and process a 1-dimensional array.

Create clear comments as you code to tell me what you are doing.
Import the Java libraries that you will need.
Create a single dimensional array that will hold 15 wages.
In the main, load an array with all of the records from a .txt file named Salary txt. The file has 15 records in it.
Sort the array in ascending order.
Write a method named increaseWages(). This method will add $500 to each of the 15 wages. In other words, you are giving each person a raise of $500.
Pass the array to the method from the main().
Increase the wage amounts in the array (as described above), in the method. In other words, in the end the array should hold the NEW, higher wages.
Output each new wage (use the console for this)
Calculate a total of the new wages in the method
Output the total of the new wages in the method (use a dialog box for this)
Return the array with the new wages to the main().
There is NO user interaction in this program.

Answers

Answer:

Here you go.Consider giving brainliest if it helped.

Explanation:

import java.io.*;//include this header for the file operation

import java.util.*;//to perform java utilities

import javax.swing.JOptionPane;//needed fro dialog box

class Driver{

  public static void main(String args[]){

      int wages[]=new int[15];//array to hold the wages

      int index=0;

      try{

          //use try catch for the file operation

          File file=new File("wages.txt");

          Scanner sc=new Scanner(file);//pass the file object to the scanner to ready values

          while(sc.hasNext()){

              String data=sc.nextLine();//reads a wage as a string

              String w=data.substring(1);//remove the dollar from the string data

              wages[index++]=Integer.parseInt(w);//convert the wage to int and store it in the array

          }

          sc.close();//close the scanner

      }catch(FileNotFoundException e){

          System.out.println("Error Occurrred While Reading File");

      }

     

      //sort the array using in built sort function

      Arrays.sort(wages);

      //print the wages

      System.out.println("Wages of 15 person in ascending order:");

      for(int i=0;i<wages.length;i++){

          System.out.print("$"+wages[i]+" ");

      }

      //call the increases wages method

      wages=increaseWages(wages);//this method return the updated wages array

     

  }

 

  //since we can call only static methods from main hence increaseWages is also static

  public static int[] increaseWages(int wages[]){

      //increase the wages

      for(int i=0;i<wages.length;i++){

          wages[i]+=500;

      }

     

      //print the new wages

      int sum=0;

      System.out.println("\n\nNew wages of 15 person in ascending order:");

      for(int i=0;i<wages.length;i++){

          sum+=wages[i];//sums up the new wages

          System.out.print("$"+wages[i]+" ");

      }

     

      //display the summation of the new wages in a dialog box

      JOptionPane.showMessageDialog(null,"Total of new wages: "+sum);

      return wages;

  }

}

3. In which of the following places can
you always find a 'home page'?
a) at home
b) in a book
c) on the World Wide Web
d) in a printer​

Answers

Answer:

On the World Wide Web

Explanation:

Sure theres always a homepage somewhere. But i dont know what your researching so i went with c.

On the World Wide Web

I need help
I am thinking about coming out to my mom because we are going to the store today and I will be in the car, I dont know if I should or not

Answers

Answer:

do it! you will have to one day so why not now? hopefully she will understand and say nice things as well and be like mom ive

been thinking a lot and i really want to tell you something. Explanation:

Answer:most likely she is your parent that you live with so she might already know but has not said anything it also depends her personality but if your ready and know or think she would not hate you forever go for it

Explanation:

What does getfenv() do?

Answers

Answer: getfenv() is a type of function. Particually a envirotment function. for a lua coding.

Explanation: What this does it goes thourgh  line of code in a particular order.

This means. getfenv is used to get the current environment of a function. It returns a table of all the things that function has access to. You can also set the environment of a function to another environment.

Forgot to include examples of where this could be used. Although not very common uses, there are some. In the past Script Builders used getfenv to get the environment of a script, and setfenv to set the environment of a created script’s environment to a fake environment, so they couldn’t affect the real one. They could also inject custom global functions.

Not entirely sure if this uses getfenv or setfenv, but the use in Crazyman32’s AeroGameFramework is making the environment of each module have access to other modules without having to require them, and having access to remotes without having to directly reference them.

Answer: ummm, who knows

Explanation:

What is a principle of DevOps?​

Answers

Answer:

the main principles of DevOps are automation, continuous delivery, and fast reaction to feedback. You can find a more detailed explanation of DevOps pillars in the CAMS acronym: Culture represented by human communication, technical processes, and tools.

In the following instruction sequence, show the values of the Carry, Zero, and Sign flags where indicated:_____.
mov al, 00001111b
test al, 00000010b
mov al, 00000110b
cmp al, 00000101b
(Hint: type in your answer as CF = ZF = SF = ___)

Answers

Answer:

CF  = 0

ZF = 0

SF = 0

Explanation:

Assuming that at the initial stage that all Flag values are = zero

every Instruction sequence will have the values of CF , ZF and SF = 0 respectively

i.e.

CF = 0

ZF = 0

SF = 0

This is because the instruction "mov" in the instruction sequence does not have an effect on the flags. until when the accumulator is loaded with the value zero

The Basic premise of____is that objects can be tagged, tracked, and monitored through a local network, or across the Internet.
The basic premise of
a. artificial intelligence
b. intelligent workspaces
c. the Internet of Things
d. the digital divide

Answers

Answer:

C.

Explanation:

Internet of things

The Basic premise of the Internet of Things is that objects can be tagged, tracked, and monitored through a local network, or across the Internet option (c) is correct.

What is IoT?

The term "Internet of things" refers to actual physical items that have sensors, computing power, software, and other innovations and can link to those other systems and gadgets via the Internet or other communication networks and share files with them.

As we know,

Using a local network or the Internet, things may be identified, tracked, and monitored is the fundamental tenet of the Internet of Things.

Thus, the Basic premise of the Internet of Things is that objects can be tagged, tracked, and monitored through a local network, or across the Internet option (c) is correct.

Learn more about the IoT here:

https://brainly.com/question/25703804

#SPJ2

12. What separated Grand turismo from other racing games was its focus on ______.
a) Your audiences and females in particular
b) Fantasy graphics and visuals
c) Pure simulation and ultrarealistic features
d) All of the above

Answers

Answer:

c) Pure simulation and ultrarealistic features

Explanation:

The main difference between Grand Turismo and other racing games was its focus on Pure simulation and ultrarealistic features. The Grand Turismo series has always been a racing simulation, which was made in order to give players the most realistic racing experience possible. This included hyperrealistic graphics, force feedback, realistic car mechanics, realistic weather, and wheel traction among other features. All of this while other racing games were focusing on the thrill of street racing and modifying cars. Therefore, it managed to set itself apart.

Which tab can be used to change the theme and background style of a presentation?
O Design
O Home
O Insert
O View

Answers

Answer:

Design

Explanation:

seems the most correct one..

I would say design as well.


What is Microsoft Excel? Why is it so popular​

Answers

Answer:

Its a spreadsheet devolpment by Microsoft.

Explanation:

Annapurno
Page
Date
corite
a programe to input length and the
breath of the rectangle and cliculate the
anecan perimeter .write a program to input length and breadth of the rectangle and calculate the area and perimeter ​

Answers

Answer:

The program in Python is as follows:

Length = float(input("Length: "))

Width = float(input("Width: "))

Area = Length * Width

print("Area: ",Area)

Explanation:

This gets input for length

Length = float(input("Length: "))

This gets input for width

Width = float(input("Width: "))

This calculates the area

Area = Length * Width

This prints the calculated area

print("Area: ",Area)

Two character strings may have many common substrings. Substrings are required to be contiguous in the original string. For example, photograph and tomography have several common substrings of length one (i.e., single letters), and common substrings ph, to, and ograph as well as all the substrings of ograph. The maximum common substring length is 6. Let X = X122 . Im and Y = yıy2 - - • Yn be two character strings. Using dynamic programming, design an algorithm to find the maximum common substring length for X and Y using dynamic programming. Please follow the general steps for designing a dynamic programming solution as in Q1 (other than the actual programming part).

Answers

Answer:

Explanation:

The following function is written in Java. It takes two strings as parameters and calculates the longest substring between both of them and returns that substring length.

import java.util.*;

class Test

{

   public static void main(String[] args)

   {

       String X = "photograph";

       String Y = "tomography";

       System.out.println(X + '\n' + Y);

       System.out.println("Longest common substring length: " + longestSub(X, Y));

   }

   static int longestSub(String X, String Y)

   {

       char[] word1 = X.toCharArray();

       char[] word2 = Y.toCharArray();

       

       int length1 = X.length();

       int length2 = Y.length();

       int substringArray[][] = new int[length1 + 1][length2 + 1];

       int longestSubstringLength = 0;

       

       for (int i = 0; i <= length1; i++)

       {

           for (int j = 0; j <= length2; j++)

           {

               if (i == 0 || j == 0)

                   substringArray[i][j] = 0;

               else if (word1[i - 1] == word2[j - 1])

               {

                   substringArray[i][j]

                           = substringArray[i - 1][j - 1] + 1;

                   longestSubstringLength = Integer.max(longestSubstringLength,

                           substringArray[i][j]);

               }

               else

                   substringArray[i][j] = 0;

           }

       }

       return longestSubstringLength;

   }

}

Mohammed needs to ensure that users can execute a query against a table but provide different values to the query each time it is run. Which option will achieve this goal?

parameter queries
dynamic queries
query joins
static queries

Answers

Answer:

the answer is B

Explanation:

a user called to inform you that the laptop she purchased yesterday is malfunctioning and will not connect to her wireless network. You personally checked to verify that the wireless worked properly before the user left your office. the user states she rebooted the computer several times but the problems still persists. Which of the following is the first step you should take to assist the user in resolving this issue?

Answers

1. Make sure most recent update has been installed.
2. Run Windows Network Trouble shooter to ensure proper drivers are up to date and existing.
3. Carefully Review Windows Event Log for more detailed troubleshooting.
4.Last resort install a fresh boot on the laptop.

14. Video game legend Shigeru Miyamoto designed all EXCEPT which of the following games?
a) Donkey Kong
b) Mario Bros
c) The Legend of Zelda
d) Pac-Man

Answers

D pac man hope im right

Suppose the program counter is currently equal to 1700 and instr represents the instruction memory. What will be the access of the next instruction if:

instr[PC] = add $t0, $t1, $t2

Answers

Answer:

C

Explanation:

omputer chip

sorry btw

When it comes to having certain sales skills as a hotel manager, being able to really hear, learn about, and show customers that the products/services you offer will meet their needs is a vital skill to have. When you show customers that you truly hear their needs, what sales skill are you practicing?
active listening
product knowledge
communication
confidence

Answers

Answer:

Communication

Explanation:

The ability to communicate clearly when working with customers is a key skill because miscommunications can result in disappointment and frustration. The best customer service professionals know how to keep their communications with customers simple and leave nothing to doubt.

The Freeze Panes feature would be most helpful for which situation?
A.when the functions used in a worksheet are not working correctly
B.when a large worksheet is difficult to interpret because the headings disappear during scrolling
C.when the data in a worksheet keeps changing, but it needs to be locked so it is not changeable
D.when a large worksheet is printing on too many pages

Answers

Answer:

i think a but not so sure

Explanation:

Answer: Option B is the correct answer :)

Explanation:

Frank enters "1" in the field for postal code. What is frank most likely trying to do?

Answers

Answer:

Explanation:

Identify the management, organization, and technology factors responsible for slow adoption rates of internal corporate social networks.when a company decides to launch a social networking program the management, all need to be on board with the launch. from the ceo down to the shift or assistant manager everyone needs to know its coming and be excited. the organization of such a launch needs to be mapped out, and training provided for the new systems. within the company, they need to make sure the technology at hand (computers, tablets, and company phones), are all compatible with the system. when a company launches a new system, and the find that the employees are not adopting it, they need to investigate the reasons. is the management at all level's onboard? did we organize the launch properly? do we have the right technology for the system? things can goeither way but if

Write a script called fact.sh that is located in your workspace directory to calculate the factorial of a number n; where n is a non-negative integer between 1 and 20 that is passed as a parameter from the command line (e.g. ./fact.sh 5). The result should be echoed to the screen as a single integer (e.g. 120).
NOTE: Do not include any other output, just output the single integer result.
Submit your code to the auto-grader by pressing Check-It!
NOTE: You can submit as many times as you want up until the due date.

Answers

Answer:

hope this helps

Explanation:

The variable strFirst's scope is _____.

Answers

pretty sure it’s d, hope this helps

Answer:

- the usernameMaker function

Explanation:

When you look at the code, you can see it's located alongside the usernameMaker. It it only utilized then, therefore being it's scope. For reassurance, it's also correct on Edge.

I hope this helped!

Good luck <3

16. The Nintendo Entertainment System (NES) saw its sales skyrocket as a result of the launch of which of the following games?
a) Pac-Man
b) Super Mario Bros
c) The Legend of Zelda
d) Popeye

Answers

Answer:

Super Mario bros

Explanation:

Need help with 9.2 Lesson Practice edhesive asap please

Answers

Answer:

Can you add an attachment please

In this exercise we have to use the computer language knowledge in python, so the code is described as:

This code can be found in the attached image.

So the code can be described more simply below, as:

height = []

height.append([16,17,14])

height.append([17,18,17])

height.append([15,17,14])

print(height)

See more about python at brainly.com/question/26104476

Explain the five generations of computer

Answers

Answer:

1 First Generation

The period of first generation: 1946-1959. Vacuum tube based.

2 Second Generation

The period of second generation: 1959-1965. Transistor based.

3 Third Generation

The period of third generation: 1965-1971. Integrated Circuit based.

4 Fourth Generation

The period of fourth generation: 1971-1980. VLSI microprocessor based.

5 Fifth Generation

The period of fifth generation: 1980-onwards. ULSI microprocessor based.

The phrase "generation" refers to a shift in the technology that a computer is/was using. The term "generation" was initially used to describe different hardware advancements. These days, a computer system's generation involves both hardware and software.

Who invented the 5th generation of computers?

The Japan Ministry of International Trade and Industry (MITI) launched the Fifth Generation Computer Systems (FGCS) initiative in 1982 with the goal of developing computers that use massively parallel computing and logic programming.

The generation of computers is determined by when significant technological advancements, such as the use of vacuum tubes, transistors, and microprocessors, take place inside the computer. There will be five computer generations between now and 2020, with the first one starting around 1940.

Earlier models of computers (1940-1956)Computers of the Second Generation (1956-1963)Computers of the Third Generation (1964-1971)Computers of the fourth generation (1971-Present)Computers of the fifth generation

Learn more about generations of computers here:

https://brainly.com/question/9354047

#SPJ2

What should be the first tag in any HTML document? A. <head> B. <title> C. <html> D. <!DOCTYPE >​

Answers

Answer:

C.

Explanation:

Write a function process_spec that takes a dictionary (cmap), a list (spec) and a Boolean variable (Button A) as arguments and returns False: if the spec has a color that is not defined in the cmap or if Button A was pressed to stop the animation Otherwise return True

Answers

Answer:

Explanation:

The following code is written in Python. The function takes in the three arguments and first goes through an if statement to check if Button A was pressed, if it was it returns False otherwise passes. Then it creates a for loop to cycle through the list spec and checks to see if each value is in the dictionary cmap. If any value is not in the dictionary then it returns False, otherwise, it returns True for the entire function.

def process_spec(cmap, spec, buttonA):

   if buttonA == True:

       return False

   

   for color in spec:

       if color not in cmap:

           return False

   return True

Your program will be used by many departments at the university. Your comments will be important to their IT people. What would be a useful comment?

This was a really hard part to write, but it finally works.

I’m not sure what this does, but I don’t have time to troubleshoot it.

This segment returns a value that is used by the segment marked B.

Answers

Answer:

This segment returns a value that is used by the segment marked B.

Explanation:

just took assigment

Answer:

C

Explanation:

In the code snippet below, pick which instructions will have pipeline bubbles between them due to hazards.

a. lw $t5, 0($t0)
b. lw $t4, 4($t0)
c. add $t3, $t5, $t4
d. sw $t3, 12($t0)
e. lw $t2, 8($t0)
f. add $t1, $t5, $t2
g. sw $t1, 16($t0)

Answers

Answer:

b. lw $t4, 4($t0)

c. add $t3, $t5, $t4

Explanation:

Pipeline hazard prevents other instruction from execution while one instruction is already in process. There is pipeline bubbles through which there is break in the structural hazard which preclude data. It helps to stop fetching any new instruction during clock cycle.

From your finding,conclusion and recommendations can you make on the issue of human rights violations to:Government​

Answers

Answer:
Different recommendations and conclusion can be drawn on human rights violation in government and communities.
Explanation:
1-Foremost thing that government can do is the legislation to control the human rights violation and this law should be applicable on all the people belong to any community. Government also make human rights violation issue a part of their policy so that every government could understand before hand.
2-Communities should run campaign so that people understand their human rights and can complain against such violations.
Human right violations happens all over the world but individuals and government need to work together to stop and eradicate such violations
Other Questions
Jaime says that the value of -1 x n is always equal to the value of n = (-1) for allvalues of n.Explain whether Jaime is correct or incorrect. The term Great Society refers to what? How did the Flood of 1927 help Huey Long win the 1928 Louisiana gubernatorial election? A) The fishermen and farmers in southern Louisiana lost their homes during the flood and decided to vote for him. B) Wealthy plantation owners wanted to continue the trend of saving money by paying their workers meager salaries. C) Large corporations backed Long because they wanted taxes reduced in order to rebuild their destroyed structures. D) Construction bosses did not want the levees rebuilt south of New Orleans because of another potential flood occurring. o find out the elevation of an area, you would use a _____________ , A) relief map B) population map C) climate map Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar.The difference of the range and the interquartile range of the data set represented by the box plot is . According to the results of the 2019 expatriate survey, which of the following most accurately describes he current state of HRM efforts o staff international operations?A. more women are accepting international assignmentsB. people without family or kids are less successful in international assignments.C. third-country nationals are quickly being replaced y localized expatriates. The cost of 2 pounds of coffee is $17.95. To the nearest dollar, what is the cost of 5 pounds of coffee? You are an intern at Lucerne Publishing.The company needs to use multiple versions of Microsoft Once on each machine in the editing department.Which virtualization strategy should the company use? How would you describe Vyry's beating? en que conciste la funcion de relacion? In a certain animal, a breed is known that always has a hairy tail; another breed is known that always has a naked tail. How would you determine which trait is dominant? i) It takes the climber 800 seconds to climb to the top of the cliff.During this time the energy transferred to the climber equals the work done bythe climber.Calculate the power of the climber during the climb.Power =W(Total 5 marPage 6 of 6 Which of the following sentences is from a firsthand biography? Please please please help me Im in honors math so our teacher makes us show our work Determine whether each sample may be biased. Explain.5. Rickie surveys people at an amusement park to find out the average size of people's immediate family6. Theo surveys every fourth person entering a grocery store to find out the average number of pets in people's homes.7. A biologist estimates that there are 1,800 fish in a quarry. To test this estimate, a student caught 150 fish from the quarry, tagged them, and released them. A few days later, the student caught 50 fish and noted that 4 were tagged. Determine whether the biologist's estimate is likely to be accurate.NO FILES OR I REPORT grr >:-( The distance from one point on the circle to another that passes through the circle is called a: Nine students are running for the school council. The student with the most votes will become class president while the student with the second-highestvotes becomes vice president, and the student with the third-highest number of votes becomes secretary How many different ways could this happen? What volume in liters of fluorine gas is needed to form 999 L of sulfur hexafluoride gas if the following reaction takes place at 2.00 atm and 273.15 K: S(s) + 3F(g) SF (g) The main idea is oftentimes stated as aA. numbered procedure.B. document section.C. topic sentence or phrase.D. supporting detail or example.E. bulleted or alphabetized list. the product of a number and two more than the number .. what is the expression?