Question
Can someone please help me with Dynamic Binding. This is my 5th time trying to get a program running but I have been late due
Can someone please help me with Dynamic Binding. This is my 5th time trying to get a program running but I have been late due to personal issues. I wanted to make a dynamic binding program based on a Network or PC I only have the first class, if anyone can add additional classes and methods that would be much appreciated. I can be contacted here or at s..6@gmail.com
Assignment:
Write a small program that uses dynamic binding. In your comments explain which statement(s) is doing the dynamic binding... But the program code structure needs to be enhanced to demonstrate dynamic binding using an abstract class. Also, ALL classes must have instance variables, Accessors, and Mutators, Constructors, and toString()/ Display() methods.
No Input/Output statements should be coded in Parent class or Child class.
Again any help would be appreciated on helping me, this is what I have so far for the first class
PCStatus.java, if compensation is required to complete the program please let me know
public abstract class PCStatus { String Status; public PCStatus(String Status) { this.Status=Status; } //get method and set method //getter public String getStatus() { return Status; } //setter public void setStatus(String Status) { this.Status = Status; } } //parent method 1 public abstract String Normal(); //parent method 2 public abstract String TurningOn(); //parent method 3 public abstract String Overheating(); //toString public String toString() { return Normal() + TurningOn() + Overheating(); } }
Step by Step Solution
3.49 Rating (149 Votes )
There are 3 Steps involved in it
Step: 1
demonstrate dynamic binding you can create a hierarchy of classes where each subclass overrides the parents methods Heres an enhanced version of your ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started