Fida Ullah ⚡'s Projects
Write a program that takes the name of a car, the distance travelled in Kilometers, the amount of fuel consumed in liters, and the price of fuel per liter as input from a user. The program calculates the per liter fuel consumption of the car (distance travelled divided by the amount of fuel consumed), and total cost of the travel in rupees. The program should have a fuelEfficiency method that takes the consumption as a parameter. The method returns one of the following possible statements based on the consumption. If the consumption is greater than or equal to 20, it returns Your car is highly fuel efficient If the consumption is equal to or greater than 15 and less than 20, it returns Your car is fuel efficient If the consumption is equal to or greater than 15 and less than 20, it returns Your car is fuel efficient If the consumption is equal to or greater than 10 and less than 15, it returns Your car needs tuning Else you need to see a mechanic An example output is given below: Enter the name of your car: Alto Enter the distance you have travelled: 100 Enter the amount of fuel consumed in litres 10 Enter the price per litres in rupees: 120 The Name of your car is: Alto Your per litter consumption is: 10.0 The total cost is: 1200.00 Your car needs tuning
Certificate Generator and sender for events hosted by CS-Lodges using the information provided by Excel Files
Repository for contribution.
Community, Events and boot camps Certification.
Config files for my GitHub profile.
This repository contains our final year project materials which we have completed allied @maaz_ahmad
DO your First Open Soucre Contribution. ❤
This Repository is all about the hacktoberfest if you have any issue you can check.
This is a special repository about myself
Contribution to open Source leetcode solution Repo. It would help you in getting different approaches to solve a problem
Saad Fareed Portfolio
A University wishes to keep information on its students. The proposed Student class has the following instance variables: studentNo: String, studentName: String, dateOfBirth: Date, meritPoints: Integer. Merit Points represents the entry qualification achieved by a student, which is a number between 20 and 200. A class variable is also required, called noOfStudents, which will be incremented each time a Student instance is created. Write Java code to perform the following, where appropriate include suitable integrity checks: a) Show the declaration of the Student class, including any setter and getter methods. Declare two constructors as follows; both constructors should increment the class variable appropriately: a. The first is a default constructor that has no parameters and sets the instance variables to either "not known" for the strings, 20 for the integer and your date of birth for the date (the Date constructor accepts dates Date format). b) The second takes 4 parameters, one for each of the instance variables. c) The Student class is extended by two sub classes Undergraduate with an additional attribute testScore, and Postgraduate with an additional attribute GPA. Both the classes implement a calculateMerit() method that returns the overall merit of the student. The undergraduate merit is calculated by adding the test score to the merit points, while for the postgraduate GPA is added to the merit points. The sub classes’ constructor should invoke the super class’s constructor and the sub classes’ toString method should invoke the super class’s toString method. d) Create a test class that creates objects to store references to the various Student objects.