Please add the code after this one. The code has to be in java eclipse. Please add comments in what you are doing. I'll appreciate it
public class Computer {
private String ModelNumber;
private String BrandName;
private String manufacturingDate;
private int NumberOfCores;
//Constructor a
public Computer() {
}
//Construct a computer object with model, BrandName, NumberOfCores
Computer (String ModelNumber, String BrandName, String manufacturingDate, int NumberOfCores){
this.ModelNumber=ModelNumber;
this.BrandName=BrandName;
this.manufacturingDate=manufacturingDate;
this.NumberOfCores=NumberOfCores;
}
//generate getters/setters
public String getModel() {
return ModelNumber;
}
public void setModel(String ModelNumber) {
ModelNumber = ModelNumber;
}
public String getBrandName() {
return BrandName;
}
public void setBrandName(String brandName) {
BrandName = brandName;
}
public String getManufacturingDate() {
return manufacturingDate;
}
public void setManufacturingDate(String manufacturingDate) {
this.manufacturingDate = manufacturingDate;
}
public int getNumberOfCores() {
return NumberOfCores;
}
public void setNumberOfCores(int numberOfCores) {
NumberOfCores = numberOfCores;
}
public String toString() {
return "\nModelNumber: "+ ModelNumber + "BrandName: "+ BrandName +"Created on "+ manufacturingDate +
"NumberOfCores: "+ NumberOfCores ;
}
public String Output() {
return "Output is from method present in ComputerObject's Class";
}
}
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 3 images
- Override the testOverriding() method in the Triangle class. Make it print “This is theoverridden testOverriding() method”. (add it to triangle class don't make a new code based on testOverriding in SimpleGeometricObject class.) (this was the step before this one) Add a void testOverriding() method to the SimpleGeometricObject class. Make it print“This is the testOverriding() method of the SimpleGeometricObject class”arrow_forwardBelow for each class you find a UML and description of the public interface. Implementing the public interface as described is madatory. There's freedom on how to implement these classes.The private properties and private methods are under your control.. There are multiple ways of implementing all these classes. Feel free to add private properties and methods. For each object, it's mandatory to create a header file (.h), implementation file (.cpp) and a driver. Blank files are included. The header should have the class definition in it. The implementation file should contain the implementations of the methods laid out in the header fine. And finally the Driver should test/demonstrate all the features of the class. It's best to develop the driver as the class is being written. Check each section to see if there are added additional requirements for the driver. Two test suites are included so that work can be checked. It's important to implement the drivers to test and demonstrate…arrow_forwardInterface This lab is a small demonstration of how interfaces work. Type up the code and submit the results. CODE public class InterfaceExample { public static void main(String[] args) { DemoClass myObj = new DemoClass(); myObj.myMethod(); myObj.myOtherMethod(); } public interface InterfaceOne { public void myMethod(); // interface method } public interface Interface Two { public void myOtherMethod(); // interface method } public class DemoClass implements InterfaceOne, Interface Two { public void myMethod() { System.out.println("Some text.."); } public void myOtherMethod() { System.out.println("Some other text..."); }arrow_forward
- The following statement is valid in Java: public interface Shape extends Cloneable, Comparable{ //code goes here } Select one: True Falsearrow_forwardBelow for each class you find a UML and description of the public interface. Implementing the public interface as described is madatory. There's freedom on how to implement these classes.The private properties and private methods are under your control.. There are multiple ways of implementing all these classes. Feel free to add private properties and methods. For each object, it's mandatory to create a header file (.h), implementation file (.cpp) and a driver. Blank files are included. The header should have the class definition in it. The implementation file should contain the implementations of the methods laid out in the header fine. And finally the Driver should test/demonstrate all the features of the class. It's best to develop the driver as the class is being written. Check each section to see if there are added additional requirements for the driver. Two test suites are included so that work can be checked. It's important to implement the drivers to test and demonstrate…arrow_forwardPythonarrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY