Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Angel for ever
help
0 Answer(s)      a year and 8 months ago
Posted in : Java Interview Questions


please answer these two assignments every one related to each other for me before Tuseday
I answer the first part please continue to me?? 

public abstract class Person implements Comparable {
private int CivilNumber;
private String Name;
private double Salary;

public Person(){

}

public Person(int CivilNumber,String Name,double Salary){
    this.CivilNumber=CivilNumber;
    this.Name=Name;
    this.Salary=Salary;

}
public int getCivilNumber(){
    return  CivilNumber;

}
public void setCivilNumber(int CivilNumber){
    this.CivilNumber=CivilNumber;

}

public String getName(){
    return  Name;

}
public void setName(String Name){
    this.Name=Name;

}
public double getSalary(){
    return  Salary;
}
public void setSalary(double Salary){
    this.Salary=Salary;

}
public String toString(){
    return Grade(Salary);
}
public String Grade(double Salary) {

    if (Salary>1500)
        return "A";
    else if (Salary >700)
        return "B";
    else 
        return "C";
}


public String Convert(String Name){
    return Convert(Name);

}
}

public abstract class Volunteer extends Person implements Comparable{
double Volunteerno;

public String Grade(double Salary) {
    Salary =0.0;
    return " No salary for the volunteers ";
}
    public String toString(){
        return super.toString();
    }

}
public abstract class Employee extends Person implements Comparable{
    double Employeeno;

        public String Grade(double Salary) {

            if (Salary>1500)
                return "A";
            else if (Salary >700)
                return "B";
            else 
                return "C";

            }
            public int bouns(String Grade){
            if (Grade == "A")
                return 100 ;
            else if(Grade == "B")
                return 50;
            else
                return 25;

        }
            public String toString(){
                return super.toString();

            }

    }

SFDV2103 ?? Java Programming
Fall, 2012
Term Project
Assignment 3 (5%) 
Due Date: (Wednesday) December 26, 2012
Overview:
As specified in the course outline this course will include a semester-long project divided into four parts. In each part you will complete a given a task. In assignment 3, you are asked to make changes in the existing class.
Problem:
Open the class ??Person?? you created in Assignment2 and modify the class for following issues:
? Modify the Person class, which will implement the comparable interface.
? Create two subclasses Volunteer and Employee.
? In Volunteer class has a variable Volunteerno and override the Grade() method by assigning salary as 0 and print the message ??No salary for the volunteers.??
? In Employee class has a variable Employeeno override the Grade() method by calculating the salary by adding bonus. If the grade is ??A?? then bonus = 100, ??B?? then bonus = 50 and ??C?? then bonus = 25.
? Invoke toString() method from these sub classes also which will display both super and sub class details.
? Write a Test program to check all above mentioned methods by invoking it. It should display all possible outputs. Also create two objects for Person class and compare these two objects and display which object is greater.
Draw a UML diagram for the above.
You must submit the source code to your teacher by printing the programs from eclipse not from word file. That program should show the results also. Also you will demonstrate your work by running your program in the lab. Also upload the final version of your program in to black board.
Note: Cheating will not be accepted, Marks will be reduced for all the members of that project group based on the percentage of cheating.

SFDV2103 ?? Java Programming
Fall, 2012
Term Project
Assignment 4 (5%) 
Due Date: (Wednesday) December 26, 2012
Overview:
As specified in the course outline this course will include a semester-long project divided into four parts. In each part you will complete a given a task. 
Problem:
? Modify the project to create user interface. Your program should let the user to enter information of your project from a text field and should display all the computed values in the previous assignments in a text area.
? Add events to display new balance whenever there is a "withdraw" or "credit".
? Add proper classes to change the color and font of the components and use proper screen layout models. Your frames should look clear and display all the details of the project.
? Draw the UML diagram that involves the new classes in this project.
You must submit the source code to your teacher by printing the programs from eclipse not from word file. That program should show the results also. Also you will demonstrate your work by running your program in the lab. Also upload the final version of your program in to black board.
Note: Cheating will not be accepted, Marks will be reduced for all the members of that project group based on the percentage of cheating.

please help me

Advertisement
View Answers

Related Tutorials/Questions & Answers:
help
help   how i can send a pitcture on url in java
help
help  pls help me to get the code of a java program a program to perform different shapes in a menu using javaapplet
Advertisements
help
help  i need help with this code. write a java code for a method named addSevenToKthElement that takes an integer array, and an integer k as its arguments and returns the kth element plus 7. any help would be greatly
HELP
HELP  I need this code to open in a new web browser. but no matter what i do it wont please help?? Directive 055 Storage Requirements for the Upstream Petroleum Industry
Help...
Help...  Write a class that displays your first name vertically down the screen ?? where each letter uses up to 5 rows by 5 columns of a character input by you with a blank line between each letter
Help!
Help!  thanks for ur code, I'd like to ask a question: after press "c" or "C", timer starts and after every delay ms, it'll print "This line is printed only once." or just print once. I'm writting a timer but it seems to perform
Help
Help  Hi; Can anyone help me to solve this errors. I use J2ME(wirlesee Toolkit 2.5.2. for CLDC Project "SlideImageMIDlet" loaded Project settings saved Building "SlideImageMIDlet" C:\Documents and Settings\???? ?????\j2mewtk
help
to the user) please tell me how could i design that. Please help me asap Thanks a lot
help
based on the percentage of cheating. please help me
help!!!!!!!!!!!!!!!!!!
help!!!!!!!!!!!!!!!!!!  import java.awt.; import java.sql.*; import javax.swing.*; import java.awt.event.* public class NewJFrame extends javax.swing.JFrame { JTextField1
Regular Expression Help Help HELP!!!!
Regular Expression Help Help HELP!!!!  HI all I am very new to java... could help me to give a solution of how to retrieve the name and email add... the quotes ""07001", "MR Harish Ram","M.RHarish @ hotmail.com"" Help is greatly
Help me
Help me  Hi, LWUIT is working in eclipse j2me for Symbian OS
help me
help me  HI. Please help me for doing project. i want to send control from one jsp page to 2 jsp pages... is it possible? if possible how to do
Help Me
Help Me  What is the source code for Sample example for Mortgage Calculator in J2ME language for developing Symbian
help me
help me  how to print from a-z, A-Z with exact order using for loop? Thanks for all concern
help me
help me  i have done as u directed but nothing happens gud to me..... . i am using netbeans is that matter at all help me and take me out from trouble where to store jfree api to use it for j2ee based project
help me
help me  MY GLASSFISH SERVER NOT START PROPERLY help me warning shows DPL5404:Specification-Version for the optional package [ GNUJAXP ] in the jarfile [ C:\Program Files\Java\jdk1.7.0_02\jre\lib\ext\gnujaxp.jar
Timeseries help
Timeseries help  hey....... can u plz help me in time series code. Can u provide a tie series code that is using the method Time series. I have seen... of Barchart???? plz help
help me
help me  please send me the java code to count the number of similar words in given string and replace that word with new one
Advertisements
 

 

 

DMCA.com