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
storchak [24]
4 years ago
13

Write a program which prompts user to enter a character, if the user presses „Z‟, the program asks user to enter a number. In th

is case the program implements 5-input majority voting logic which is explained as follows.The value of the number represented by the five leftmost bits of Register-B is tested. If the number of logic '1' bits (in the 5 leftmost bits) is greater than the number of logic '0' bits, the program should output: "The number of 1’s in the 5 left most bits is greater than the number of 0’s". If the number of logic '0' bits (in the 5 leftmost bits) is greater than the number of logic '1' bits, the program should output: "The number of 0’s in the 5 left most bits is greater than the number of 1’s"
Computers and Technology
1 answer:
wolverine [178]4 years ago
3 0
I’m pretty sure the answer is A
You might be interested in
Your motherboard supports dual channeling and you currently have two slots populated with DIMMs; each module holds 2 GB. You wan
Olenka [21]
One 4-GB DIMM. Dont really have a explanation for it just comes from previous experience
6 0
4 years ago
Read 2 more answers
Given the Solid class, extend it with:
andreev551 [17]

Answer:

Following are the code to this question:

Explanation:

//For Solid:

public class Solid//defining a class Solid

{

private String myName;//defining a String variable

public Solid(String name)//defining parameterized constructor

{

myName = name;//holding String value in myName variable

}

public String getName()//defining getName method  

{

return myName;//return value of myName

}

public double volume()//defining method volume that overriden its subclass

{

return 0;//return value

}

public double surfaceArea()//defining method surfaceArea that overriden its subclass

{

return 0;//return value

}

}

//For RectangularPrism:

public class RectangularPrism extends Solid//defining a class RectangularPrism that inherits Solid

{

  protected double length,width,height;//defining double variable

RectangularPrism(String str,double l,double w,double h)//defining parameterized constructor

{

  super(str);//use super method

  this.length=l;//use this to hold value

  this.width=w;//use this to hold value

  this.height=h;//use this to hold value

}

public double volume()//defining volume method  

{

return length*width*height;//calculate and return volume value

}

public double surfaceArea()//defining a  method surfaceArea  

{

return 2*(length*width+width*height+height*length);//calculate and return the surfaceArea

}

}

// For  Cube:

public class Cube extends RectangularPrism//defining Cube class that inherits RectangularPrism  

{

  Cube(String name, double side) //defining parameterized constructor

   {

       super(name, side, side, side);//use super method

   }

  public double volume()//defining volume method  

  {

   return length * length * length;//calculate and return volume

  }

public double surfaceArea()//defining method surfaceArea  

  {

  return 6 * length*length;//calculate and return surfaceArea

   }

}

//for Cylinder:

import java.lang.*;//import lang package  

public class Cylinder extends Solid//defining Cylinder class that inherits Solid

{

  private double radius, height;//defining double variable

  public Cylinder(String str, double r, double h)//defining parameterized constructor

  {

      super(str);//use super Method

      this.radius = r;//use this keyword to hold value

      this.height = h;//use this keyword to hold value

  }

  public double volume()//defining volume method

  {

      return Math.PI * radius * radius * height;//calculate and return volume

  }

  public double surfaceArea()//defining surfaceArea method

  {

     return 2 * Math.PI * radius * (height + radius);//calculate and return surfaceArea

  }

}

//For Pyramid

import java.lang.*;//import package

public class Pyramid extends Solid//defining a Pyramid class that inherits Solid

{  

  private double length, width,height;//defining double variable

  public Pyramid(String str, double l, double w, double h)//defining parameterized constructor  

  {

      super(str);//use super method

      this.length = l;//use this keyword to hold value

      this.width = w;//use this keyword to hold value

      this.height = h;//use this keyword to hold value

  }

public double volume()//defining volume method

{

return (length*width*height)/3.0;//calculate and return volume

}

public double surfaceArea()//defining a method surfaceArea

{

return (length*width)+length*Math.sqrt((Math.pow((width/2),2)+(height*height)))+(width*Math.sqrt((Math.pow((length/2),2)+(height*height))));//calculate and return surfaceArea

}

}

//For Sphere

import java.lang.*;//import package

public class Sphere extends Solid //defining Sphere class that inherits Solid

{

  private double radius;//defining double variable

  public Sphere(String str, double r)//defining parameterized constructor  

  {

      super(str);//use super method

      this.radius = r;//use this to hold value

  }

  public double volume()//defining volume method

  {

      return (4.0/3.0)*Math.PI*radius*radius*radius;//calculate and return volume

  }

  public double surfaceArea()//defining method surfaceArea  

  {

    return 4 * Math.PI * radius * radius;//calculate and return surfaceArea

  }

}

please find attachment.

6 0
3 years ago
Define a method calcPyramidVolume with double data type parameters baseLength, baseWidth, and pyramidHeight, that returns as a d
enyata [817]

Answer:

The method in C++ is as follows:

double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){

   double baseArea = calcBaseArea(baseLength, baseWidth);

   double volume = baseArea * pyramidHeight;

   return volume;    

}

Explanation:

This defines the calcPyramidVolume method

double calcPyramidVolume(double baseLength, double baseWidth, double pyramidHeight){

This calls the calcBaseArea method to calculate the base area of the pyramid

   double baseArea = calcBaseArea(baseLength, baseWidth);

This calculates the volume

   double volume = baseArea * pyramidHeight;

This returns the volume

   return volume;  

}

<em>See attachment for complete program that include all methods that is required for the program to function.</em>

5 0
3 years ago
i have a bag of trail mix . one half of the bag is peanuts. 1/4 of the bag is chocolate candies , and 1/4 of the bag is died fru
Lelu [443]
In our bag, 1/2 is peanuts, 1/4 is chocolate and 1/4 is dried fruit.

The likelihood of drawing a chocolate therefore is 1/4. 

The likelihood of drawing a peanut is 1/2 and the likelihood of drawing a dried fruit is 1/4.

Thus, D is the correct answer because the 1/4 likelihood of drawing a chocolate is less than the 1/2 chance of drawing a peanut.
8 0
3 years ago
Explain why there are fundamental ideas of software engineering that apply to all types of software systems.
olasank [31]

Solution:

Because of all software systems have common quality attributes, including  

Fundamental software engineering activities.  The four basic process activities of specification, development, validation and evolution are organized differently in different development processes.  The software is implemented either by developing a program or programs or by configuring an application system. Such that at they (Software engineer) have been made keeping in mind project development. They hence, apply to all software systems and even non software systems. They are the fundamentals for any kind of project development.

Thus this is the required answer..


5 0
3 years ago
Other questions:
  • Allison needs to graph the yearly average snowfall in Alaska. She should use a:
    13·2 answers
  • Two users, UserA and UserB, are engaging in secure communication using only asymmetrical encryption. UserA needs to send a secur
    11·1 answer
  • In Windows 2000 and later, the ____ command shows you the file owner if you have multiple users on the system or network.
    15·1 answer
  • RDBMS stands for_________________
    12·1 answer
  • 14.18 Lab 5d - Nested Looping Write a program that:
    10·1 answer
  • What term describes one or more characters following the last period in a filename, such as .exe, .txt, or .avi?
    9·1 answer
  • An Administrator wants to have a thank you email sent after the form on the "Request a Demo" landing page is submitted. Where ca
    12·1 answer
  • Which of these are variables in an organization? Choose three.
    9·1 answer
  • How many questions do you have to answer before you can use direct messages on Brainly?
    13·2 answers
  • What is the difference between software and operating system software?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!