Write a code in java to meet the following requirements
. You have an abstract representation Animal that has a method sound). Since this is abstract representation class so we can't give it a implementation.
. You have three classes horae, dog and cat. You need to provide implementation of sound method according to specific class.
. Create a class by name overload. Create the method Demo() in overload class
. Overload the method by using following instructions
Demo instance of borse, cat or dog) // in method body print sound of particular animal
Demo instance of cat and dog) // in method body print sound of particular animal
Demo Instance of cat, dog and horse) // in method body print sound of particular animal
Write main method
Create objects of horse, cat and dog class.
Call overloaded methods of overloaded class by using correct parameters.
Write a programme to demonstrate the Dynamic Memory Allocation with some real-time
example. Also, mention the possible ways of intializing and deallocating memory from dynamically
created objects of the class
What is the difference between Virtual Function and Pure Virtual Function? Is it always mandatory
to implement or define all the pure virtual function of the base class into derived class? Justify your
answer.
Choose data members for class Car to define its properties. Create 2 objects of class Car and
overload the operator ‘greater than’ > to compare both the objects concerning their data members
Create 5 objects of class Product, input its product code, name and quantity and write into the
FILE. Later, display the data of all objects by reading from the FILE
Why English is important for professional communication. Explain the importance of formal written Communication for professional purposes.
A trolley,mass 5kg moves at 4m.s east across a frictionless horizontal surface. A brick of mass 1.5kg is dropped onto the trolley . Calculate the change in momentum of the 5kg trolley
The chloride in a sample containing approximately 3.5 % NaCl is to be determined gravimetrically as AgCl. What weight of sample must be taken to obtain a precipitate that will weigh about 0.10 g?
Design a program using a console application in java NetBeans, named studentMarksReport that will print the final result obtained by a student with the weighting of each module. Make use of a class named Student that contains variables to store the student number, test result, assignment result and exam. Create a constructor that accepts the student number, test result, assignment result and the exam result as parameters and create get methods for the variables (UseJOptionePane to get variable from the user). Create a subclass called Student_Report that extends the Student class. The Student_Report overrides all getter methods and the constructor from Students. Write code for the print_report method which calculates each assessment weighting as follows:
test =25% weighting
assignment=25%weighting
exam=50%weighting
A firm operates in aperfectly competitive market . The market price of it's product is 4 birr and the total cost function is given by TC=1/3Q^3-5Q^2+20Q+50,Where TC is the total cost and Q is the level of output
A. What level of output should the firm produce to maximize it's profit ?
B. Determine the level of profit at equilibrium ?
C. What minimum price is required by the firm to stay in the market ?