1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aleksandrvk [35]
3 years ago
8

Write the printItem() method for the base class. Sample output for below program:

Computers and Technology
1 answer:
Anna [14]3 years ago
4 0

Answer:

The printItem() method code is filled in the explanation, highlighted with bold font.

Explanation:

// ===== Code from file BaseItem.java =====

public class BaseItem {

  protected String lastName;

  public void setLastName(String providedName) {

      lastName = providedName;

      return;

  }

// FIXME: Define printItem() method

/* Your solution goes here */

  public void printItem() {

      // TODO Auto-generated method stub

      System.out.println("Last name: "+lastName);

  }

}

// ===== end =====

You might be interested in
Microsoft words spell checker
Degger [83]
The answer it is A i hope is good
3 0
2 years ago
Write a function called countstuff () that takes as a parameter a character array, and returns an int. The prototype must be:
PSYCHO15rus [73]

Answer:

Please kindly go to the explanation part.

Explanation:

The required function is written in Raw code below.

Function:

#include<stdio.h>

#include<ctype.h> //including required libraries

int countstuff(char s[]){ //Function countstuff

int cntUp=0,cntLow =0,cntDigits = 0,i=0,value; //declaring required variables

for(i=0;s[i]!='\0';i++){ //loop to iterate over the characters of string

if(isupper(s[i])){

cntUp++; //incrementing count of uppercase if it is uppercase character

}

else if(islower(s[i])){

cntLow++; //incrementing count of lowercase if it is lowercase character

}

else if(isdigit(s[i])){

cntDigits++; //incrementing count of digits if it is digit

}

}

value = cntUp*1000000 + cntLow*1000 + cntDigits; //counting value using formula given in question

return value; //returning the value

}

void main(){

char string[1000]; //declaring required variables

int value;

printf("Enter a String:");

scanf("%[^\n]s",string); //taking string as input

value = countstuff(string); //calling function

printf("The Value is : %d\n",value); //printing result

}

5 0
3 years ago
Please name the OOP term that allows children classes to have methods with the same names as methods in their parents.
RSB [31]

Answer:

Inheritance

Explanation:

3 0
3 years ago
4. Computer processing work that is split between a desktop computer and a more powerful computer that processes and stores shar
jeyben [28]

Answer:

A. client/server

Explanation:

Beacuse a Server or a client is what hold data for big companies like google and microsoft

7 0
3 years ago
Someone hacked into an employee's computer and erased all of their data. All data for the past three weeks was lost as that was
hichkok12 [17]

WWW/ World Wide Web.

7 0
3 years ago
Other questions:
  • Given a string variable named sentence that has been initialized , write an expression whose value is the the very last characte
    14·1 answer
  • The ability to learn a new computer software program is to ____________ as knowledge of state capitals is to _____________.
    11·1 answer
  • Lewis is using a stylus with his touch screen computer in order to draw a
    8·1 answer
  • TWO QUICK QUESTIONS
    12·1 answer
  • HELP 15 POINTS
    12·2 answers
  • Why is know app downloading in my android phone even if I have 900 MB ???
    8·2 answers
  • Write a pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0
    9·1 answer
  • Suppose that the first goal in a GP problem is to make 3 X1 + 4 X2 approximately equal to 36. Using the deviational variables d1
    15·1 answer
  • True or false scientists investigate and seek to explain the natural world
    14·1 answer
  • NO SPAMMERS, ONLY FULL ANSWER
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!