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
Novosadov [1.4K]
3 years ago
11

We have to calculate the percentage of marks obtained in three subjects (each out of 100) by student A and in four subjects (eac

h out of 100) by student B. Create an abstract class 'Marks' with an abstract method 'getPercentage'. It is inherited by two other classes 'A' and 'B' each having a method with the same name which returns the percentage of the students. The constructor of student A takes the marks in three subjects as its parameters and the marks in four subjects as its parameters for student B. Create an object for eac of the two classes and print the percentage of marks for both the students.
Computers and Technology
1 answer:
MAXImum [283]3 years ago
6 0

Answer:

abstract class Mark  //Creating an Abstract class{

abstract double getPercentage();}

class A extends Mark{

double result;

A( int val1, int val2, int val3){

 result=(val1+val2+val3)/3;}

double getPercentage(){

 return result;}}

class B extends Mark{

double result;

B(int val1, int val2, int val3, int val4){

 result=(val1+val2+val3+val4)/4;}

double getPercentage(){

 return result;}}

class Main{

public static void main(String args[]){

 //class A Object

 Mark obj_1=new A(10,20,30);

 System.out.println(obj_1.getPercentage());

 //class B Object

 Mark obj_2=new B(10,20,38,46);

 System.out.println(obj_2.getPercentage());}}

You might be interested in
A device that filters data traffic at a network boundary​
Semmy [17]

Answer:

Bridges

Explanation:

A bridge is a transition effects that separates network traffic at the network's edge. By splitting a local area network into two parts, bridges minimise the number of bandwidth.

6 0
2 years ago
NEED BY 15 MINUTES PLEASE! WILL MARK BRAINLIEST!You can create special effects in an image using a camera or a photo-editing too
vovangra [49]

Answer:

Special Lenses For Special Effects. ... These specialty lenses may be designed with movable focal planes for amazing depth of field, or built to focus extremely close to tiny subjects for macro enlargements, or even to produce a specific type of soft focus that's flattering for portraits

The meaning of photo editing is the act of altering an image, simply put. But that’s oversimplifying a subject which is quite complex.

For example, some photo editing techniques are done manually, while others are conducted through automated software. Some photo editing is even done offline, on actual photographs, posters or other printed collateral.

Other terms for photo editing:

Image editing

Post-processing

Image/photo manipulation

Photoshopping

Image/photo enhancement

Explanation:

so they both are alike because they can both be used to edit photos and both are great to use

3 0
3 years ago
Given a String variable named sentence that has been initialized, write an expression whose value is the number of characters in
Troyanec [42]
Python:

sentence = “this is the sentence.”
size = len(sentence)

C++:

string sentence = “this is the sentence.”
int size = sentence.size()

* Remember strings are just arrays of characters.

5 0
2 years ago
7.2 code practice edhesive
goblinko [34]

Answer:

Explanation:

got a 100

7 0
2 years ago
Read 2 more answers
Which of the following tools and techniques shows theimpacts of one decision over another as well as the probability andcost of
Nezavi [6.7K]

Answer: Probability/impact risk matrix

Explanation: Probability/impact risk matrix is type of matrix that defines the probability as well as impact that depicts whether the risk is low ,high or moderate.

Impact matrix is sort of tool which helps in conversion of any plan into a action. Probability matrix help in defining the chances in defining the risk.The positioning of the impact value of risk is plotted  on the vertical axis and performance value on the horizontal axis.

Thus probability/impact matrix is the correct tool for the problem mentioned in the question.

6 0
2 years ago
Other questions:
  • 1. Which of the following are considered CAD powerhouses?
    6·1 answer
  • Amy has decided to use a dark background and light colored text for her prensentation. Which toolbar option will let her change
    5·1 answer
  • What are some of the advantages of using the F measure (weighted harmonic mean) over using the Precision & Recall when evalu
    15·1 answer
  • Where is an ideal location to build a ground based observatory?
    10·1 answer
  • what key aspects did you learn regarding the creation, analysis, and management of information systems? How will this impact you
    5·1 answer
  • Dust buildup inside a desktop PC case can be managed effectively by ____.
    7·2 answers
  • When considering changing the content of a cell which button should you press to leave the cell as it originally was? 
    5·1 answer
  • I'm getting an iphone xr today. what should i do 1st? Any cool fetures? i have a iphone 6 now so its a pretty big upgrade
    13·2 answers
  • Develop a program to sort a file consisting of bonks details in the alphabetical order of author names. The details of books inc
    5·1 answer
  • write a program that computes an integer's checksum. to compute the checksum, break the integer into its constituent
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!