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]
4 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]4 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
When is it most appropriate to quote from an e-mail message in a response?
allochka39001 [22]
I would say *d. when the quote is a part of a series of e-mails written by more than one person.*

eskettit hope this helped.
4 0
3 years ago
Read 2 more answers
What does HTML stand for?
Wittaler [7]

Hypertext Markup Language

5 0
3 years ago
Read 2 more answers
What is the area on a machine where work is actually being performed and
zhenek [66]

Answer:

Point of operation guarding

Explanation:

Point of operation guarding. Point of operation is the area on a machine where work is actually performed upon the material being processed. The point of operation of machines whose operation exposes an employee to injury, shall be guarded.

5 0
3 years ago
Dell is an American corporation that deals with computer technology. With its worldwide sourcing and fully merged production and
UNO [17]

Answer:

Dell is a globally integrated company

Explanation:

A company that designs its strategy, management, and  operations in pursuit of a new goal; which is the integration of production and value delivery worldwide is known to be a globally integrated company.

From the question, Dell was described as an American corporation that deals with computer technology with its worldwide sourcing and fully merged production and marketing system. Thus, Dell is  a globally integrated company.

7 0
3 years ago
Two technicians are discussing using a lift to raise a vehicle. Technician A says to be sure the lift pads on the lift are conta
lianna [129]
Its B no doubt
cuz ik how to do this i took classes for this so ik im right ight
6 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that reads a 4-bit binary number from the keyboard as a string and then converts it into decimal. For example, i
    11·1 answer
  • Rachel uses a word processor to write short stories. However, most of her time is spent toying with the keys, rather than in wri
    13·2 answers
  • The Distribute commands will evenly distribute the rows and columns within what? The width and height of the document. The width
    5·1 answer
  • discuss in an essay format the steps one needs to take to develop a management information system(MIS)give examples to support y
    7·1 answer
  • Dialogue is not a characteristic of functional text because
    9·1 answer
  • Which formal security-related process should take place at the beginning of the code creation project? Group of answer choices R
    13·1 answer
  • The data in a database management system that identifies the names of​ tables, fields in each​ table, and the properties of each
    13·2 answers
  • Imagine Frankie has a computer with a full hard drive. She needs to create and save a new document, so she deletes a bunch of ol
    8·1 answer
  • The pH scale is_____ ?
    5·1 answer
  • Visit on social networking site and look for the site's privacy policy.The link is typically found at the bottom of the page and
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!