• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.
  • The forums have been upgraded with support for dark mode. By default it will follow the setting on your system/browser. You may override it by scrolling to the end of the page and clicking the gears icon.

Looking for a good Java Programmer

Joined
Dec 7, 2005
Messages
975 (0.14/day)
System Name GRAYSCALE\Butterfly
Processor Intel Core i7 8700k @ 5.2Ghz\Intel 4690k
Motherboard ASUS Maximus X Hero \Asus Z97 Maximus Hero VI
Cooling Custom Water\Stock
Memory 2x8GB G.Skill RGB DDR4-3200 \2x8GB Crucial Ballistix DDR3-1600
Video Card(s) NVidia Titan Xp w/ EK Block \ MSI Reference GTX 780
Storage 512GB Samsung 960 PRO (M.2)\128GB OCZ Vertex 4 + 500GB WD Black
Display(s) Asus PG278Q ROG Swift\Acer x213h 21.3'' 1920x1080 LCD
Case Thermaltake P3 Core\NZXT S340
Audio Device(s) Integrated w/ AKG K702 65th Anny's\Integrated
Power Supply Corsair HXi 1000 \Corsair HX850
Mouse Logitech G502 Proteus Spectrum\2014 Razer Naga
Keyboard Ducky One TKL RGB
Software Windows 10 Pro (x64)\Windows 10 Pro (x64)
Basically for my class I need to make 3 files:

P04
P04Cylinder
P04CylinderInterface

P04Cylinder Implements P04CylinderInterface

and then P04 is your main()

my issue is I was sick when we covered interfaces, so I am so lost its not even funny!

If you want to speak with me Id hope to do it over AIM or something we can Im with because I need my issue fixed rather quickly, I have the files made im Just receiving a compiling error, I dont mind sending you the files.

AIM is Wastedslyr and my email is wastedslayer@gmail.com

Hit me back,
Mike
 
In a small nutshell:

1. A Java Interface is a class that just contains empty definitions of methods.
2. Any number of classes can "implement" an interface class.
3. Every class that does "implement" an interface class MUST contain methods that override those listed in the interface.
4. In P04 you can create objects of static type "P04CylinderInterface". You can instantiate it to any class that implements that interface.

Code:
public interface P04CylinderInterface {
    public String giveMeText();
}
Code:
public class P04Cylinder implements P04CylinderInterface {
    public String giveMeText() {
        return "TEXT!!";
    }
}
Code:
public class P04  {
    public static void main(string[] args){
        P04CylinderInterface p;
        p = new P04Cylinder();
        System.out.println(p.giveMeText());
    }
}

Give that a go, i'd try it but it's late and i've got work tomorrow. Good luck :)
 
How about you post your codes and the errors here then we will see what is your problem.
 
Back
Top