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
Distinguish<br> between formal and Informal<br> Information System<br> Information systems
Harlamova29_29 [7]

Explanation:

Formal; A formal information system is based on

the organization represented by the organization chart.

Informal; The informal information system is

employee based system designed

to meet personal and vocational needs

and to help in solution of work-related problems.

5 0
2 years ago
What is a list of data organized for easy access?
ozzi

Answer:

An Array

Explanation:

Array and Object is a good use for storing data and accessing it

6 0
2 years ago
Select all of the true statements about financial literacy. Financial literacy is the knowledge about money and what you do with
erastova [34]

The correct statements about financial literacy from the given options are as follows:

  • Financial literacy is the knowledge about money and what you do with money.
  • Financial literacy includes information about income, banking, loans, career, credit, and consumer rights.
  • One reason to become financially literate is to save you money.
  • One reason to become financially literate is to help you make smart financial decisions.

The only option that isn’t included is: <em>One reason to become financially literate is to make you rich</em>.  Though knowledge about financial literacy can help you in managing your finances, you would need great amount of knowledge about other fields to be able to become rich - not just financial literacy.


5 0
3 years ago
The way a particular application views the data from the database that the application uses is a.
masha68 [24]

The way a particular application views the data from the database that the application uses is a sub-schema.

<h3>What is Database?</h3>

A Database may be defined as a process of collecting data and information that is principally assembled for quick search and recoupment by a computer.

The sub-schema is the reasoning elucidation of that section of the database which is applicable and accessible to a specific application. This type of database is common to two or more applications.

Therefore, the sub-schema is the way through which a particular application views the data from the database that the application uses.

To learn more about Database, refer to the link:

brainly.com/question/26096799

#SPJ4

4 0
1 year ago
Hoda needs to create a chart that is associated with an Excel spreadsheet. She needs to ensure that if the data in the spreadshe
omeli [17]

Answer:

Link the chart.

Explanation:

Microsoft Excel is a software application or program designed and developed by Microsoft Inc., for analyzing and visualizing spreadsheet documents.

A spreadsheet can be defined as a file or document which comprises of cells in a tabulated format (rows and columns) typically used for formatting, arranging, analyzing, storing, calculating and sorting data on computer systems.

In this scenario, Hoda needs to create a chart that is associated with an Excel spreadsheet. Also, she wants the data in the spreadsheet to change as soon as the chart in her presentation is updated. Thus, the option she must choose is to link the chart with the spreadsheet.

In the source spreadsheet, she should select a chart and the cell where she wants the hyperlink to appear. Then, she should create a hyperlink that links to the spreadsheet.

8 0
3 years ago
Other questions:
  • When you declare an array, _____________________ You always reserve memory for it in the same statement You might reserve memory
    9·1 answer
  • The unique global address for a web page or other resource on the internet is called the ________.
    7·1 answer
  • _____ _____ deals with the definitions properties of mathematical models of computation.
    8·1 answer
  • The number of pixels that can be displayed on the screen at one time is known as what? screen resolution. viewing angle. color d
    5·1 answer
  • When microsoft introduced its zune mp3 player, many people thought it would capture the mp3 player market by pricing its product
    8·1 answer
  • Given the following while() loop, which statement is true assuming A,B,C,D are int variables and A &gt; B? while ( ( A &gt;= B)
    8·1 answer
  • If you wish to maintain a consistent style to all the documents you create, it would be helpful to use a _​
    5·1 answer
  • Which statistical function in a spreadsheet helps you to see how far each number varies, on average, from the average value of t
    5·1 answer
  • Flash drive DVD and hard drive are all examples of
    6·2 answers
  • 4.8% complete this is a single choice question; skip ahead to question content a b c d confirm difficulty level: moderate an int
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!