Purpose:
The main goal of this assignment is to practice Object Oriented Programming by creating classes, writing methods, and creating inheritance type relationships.
Task:
Superclass: EmpBasicInfo
Subclasses: Manager, WageEmployee
Program:
import java.util.*;
class EmpBasicInfo
{
void employeeInfo(int empID,String empName)
{
System.out.println("Employee ID:
"+empID);
System.out.println("Employee Name:
"+empName);
}
}
class Manager extends EmpBasicInfo
{
void salaryInfo(int empID,String empName,double
rate,int month)
{
super.employeeInfo(empID,
empName);
System.out.println("Rate:
"+rate);
System.out.println("Month:
"+month);
System.out.println("Salary :
"+(rate*month));
}
}
class WageEmployee extends EmpBasicInfo
{
void salaryInfo(int empID,String empName,double
rate,int day)
{
super.employeeInfo(empID,
empName);
System.out.println("Rate:
"+rate);
System.out.println("Days:
"+day);
System.out.println("Salary :
"+(rate*day));
}
}
public class EmployeeDetails
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int empIDM,empIDW;
String empNameM,empNameW;
double rateM,rateW;
int month,day;
Manager mEmp=new Manager();
System.out.println("Enter details of Manager :
");
System.out.print("Enter Employee ID: ");
empIDM=sc.nextInt();
System.out.print("Enter Employee Name: ");
empNameM=sc.next();
System.out.print("Enter Rate: ");
rateM=sc.nextDouble();
System.out.print("Enter Month: ");
month=sc.nextInt();
WageEmployee wEmp=new WageEmployee();
System.out.println("Enter details of Wage Employee :
");
System.out.print("Enter Employee ID: ");
empIDW=sc.nextInt();
System.out.print("Enter Employee Name: ");
empNameW=sc.next();
System.out.print("Enter Rate: ");
rateW=sc.nextDouble();
System.out.print("Enter day: ");
day=sc.nextInt();
System.out.println("\nDetails of Manager: \n");
mEmp.salaryInfo(empIDM, empNameM, rateM, month);
System.out.println("\nDetails of Wage Employee:
\n");
wEmp.salaryInfo(empIDW, empNameW, rateW, day);
}
}
Output:

Purpose: The main goal of this assignment is to practice Object Oriented Programming by creating classes,...
*Python* INTRODUCTION: The goal of this programming assignment is to enable the student to practice object-oriented programming using classes to create objects. PROBLEM DEFINITION: Write a class named Employee that holds the following data about an employee in attributes: name, IDnumber, department, jobTitle The class should have 8 methods as follows: For each attribute, there should be a method that takes a parameter to be assigned to the attribute. This is known as a mutator method. For each...
1) Using the Object-Oriented Programming Paradigm,implement the necessary code in Python creating a ‘Car’ class with a constructor that stores all the Car information (ID, MAKE, MODEL, YEAR , COLOR, MILEAGE, PRICE_TO_DEALER, SALE_PRICE, PROFIT) as attributes. 2) Implement and add the following methods to the ‘Car' class in Question 1. a) necessary getter methods b) necessary setter methods c) method to display all the information to the screen d) a method to calculate the profit
Assignment Requirements
I have also attached a Class Diagram that describes the
hierarchy of the inheritance and interface behaviors . The link to
the PDF of the diagram is below
MotorVehical.pdf
Minimize File Preview
User Define Object Assignment:
Create a Intellij Project. The
Intellij project will contain three user defined
classes. The project will test two of the User Define Classes by
using the invoking each of their methods and printing the
results.
You are required to create three UML...
Can you please pick Automobile For this assignment. Java Programming Second Inheritance OOP assignment Outcome: Student will demonstrate the ability to use inheritance in Java programs. Program Specifications: Programming assignment: Classes and Inheritance You are to pick your own theme for a new Parent class. You can pick from one of the following: Person Automobile Animal Based on your choice: If you choose Person, you will create a subclass of Person called Student. If you choose Automobile, you will create...
In c# So far, you
have created object-oriented code for individual classes. You have
built objects from these classes. Last week, you created a UML for
new inherited classes and objects. Finally, you have used
polymorphism. When you add abstraction to this mix, you have the “4
Pillars of OOP.” Now, you begin putting the pieces together to
create larger object-oriented programs.
Objectives for the
project are:
Create OO classes that contain
inherited and polymorphic members
Create abstracted classes and...
Programming Assignment 6: Object Oriented Programming Due date: Check Syllabus and Canvas Objectives: After successfully completing this assignment, students will practice Object Oriented design and programming by creating a Java program that will implement Object Oriented basic concepts. RetailItem Class: Part 1: Write a class named RetailItem that holds data about an item in a retail store. The class should have the following fields: • description. The description field references a String object that holds a brief description of the...
Java - Object Oriented Programming
From the game slither.io
Identify objects that you can see on the
picture.
Pick one object from part a. Create a class
(Java code) for that object which contain data member,
method and constructor. Implement the class inside main
function by creating that object.
Programming Assignment 5: UML Diagram Objectives: After successfully completing this assignment, students will practice Object Oriented design by creating an UML diagram for a Java program. Program Statement: Bank System You were asked to create a simple UML diagram for a bank system. Each bank has a specific identification number, a name, and a location that needs to be stored. Tellers serve customers’ loans, checking and savings accounts. The bank must know each tellers’ name and identification number for record...
Write java program
The purpose of this assignment is to practice OOP with Array and Arraylist, Class design, Interfaces and Polymorphism. Create a NetBeans project named HW3_Yourld. Develop classes for the required solutions. Important: Apply good programming practices Use meaningful variable and constant names. Provide comment describing your program purpose and major steps of your solution. Show your name, university id and section number as a comment at the start of each class. Submit to Moodle a compressed folder of...
Project Lists and Object-oriented Programming Note: using c++ This project is an individual assignment that focuses on object-oriented programming and lists. The list will be a doubly-linked list and it will be implemented using nodes and pointers. The data contained in the list will be objects from a class. Project data: You will choose one of the following classes to define: Boat, Earthquake, Game, Sport, State, Website, House, Phone, Activist, Plant, Fish, Parrot, and Course. Your class code will include...