SlideShare a Scribd company logo
1 of 2
Download to read offline
I'm writing an abstract class in java right now for this json file and I'm not too sure why my code
is wrong.
7 usages int numMember; // number of members in Department 9 usages int numProject; //
number of currently working projects 2 usages private Project[] projects; // currently working
projects 1 usage private Employee[] members; // employees working in the department 7 usages
Employee leader; // leader of department 6 usages public Department(int numMember, int
numProject, Project[] projects, Employee[] members, Employee leader) { this. numMember =
numMember; this.numProject = numProject; this.projects = projects; this.members = members;
this. .eader = leader; } 6 implementations public abstract void displayDetails(); 4
implementations abstract void addProjects(Project newProject); // more attributes if necessary
class Mobile extends Department { public Mobile(int numMember, int numProject, Project[]
projects, Employee[] members, Employee leader) { super(numMember, numProject,projects,
members, leader); // more attributes if necessary class Mobile extends Department { public
Mobile(int numMember, int numProject, Project[] projects, Employee[] members, Employee
leader) { super (numMember, numProject, projects, members, leader);
} @override public void displayDetails() { System.out.println("Members: " + numMember);
System.out.println("Number of Projects: " + numProject); System.out.println("Leader: " +
leader); } Qoverride void addProjects(Project newProject) { projects [numProject ]=
newProject; numProject++; System.out.println("Project added to Mobile Department: " +
newProject.getProjectName()); } }
"Name": "ACE Company", "Year": "2001", "CEO": "Ontaria Laker", "Number of Departments":
6, "Number of Employees": 7, "Departments": [ { "Name": "Mobile", "Leader": "David
Collins", "Number of Current Working Projects": 1, "Projects": ["ACE App"] },{ "Name":
"Test", "Leader": "Alice Wonderland", "Number of Current Working Projects": 0 , "Projects": []
},{ "Name": "Game", "Leader": "Hulk Hogan", "Number of Current Working Projects": 1,
"Projects": ["Ace Ventura"] },{ "Name": "Web", "Leader": "Bruce Duster", "Number of
Current Working Projects": 3, "Projects": ["ACE Platform", "ACE App", "ACE Support"] },{
"Name": "Maintenance",
},{ "Name": "Maintenance", "Leader": "Donald Kennedy", "Number of Current Working
Projects": 2, "Projects": ["ACE Platform", "ACE Support"] },{ "Name": "Service", "Leader":
"Lauren Liu", "Number of Current Working Projects": 1, "Projects": ["ACE Support"] } },{
"Name": "Maintenance", "Leader": "Donald Kennedy", "Number of Current Working Projects":
2, "Projects": ["ACE Platform", "ACE Support"] },{ "Name": "Service", "Leader": "Lauren
Liu", "Number of Current Working Projects": 1, "Projects": ["ACE Support"] }

More Related Content

Similar to Im writing an abstract class in java right now for this json file a.pdf

hw2.docxHomework #2Please complete the homework problems on th.docx
hw2.docxHomework #2Please complete the homework problems on th.docxhw2.docxHomework #2Please complete the homework problems on th.docx
hw2.docxHomework #2Please complete the homework problems on th.docx
wilcockiris
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
Ran Mizrahi
 

Similar to Im writing an abstract class in java right now for this json file a.pdf (20)

HTML5 for the Silverlight Guy
HTML5 for the Silverlight GuyHTML5 for the Silverlight Guy
HTML5 for the Silverlight Guy
 
Crafting Evolvable Api Responses
Crafting Evolvable Api ResponsesCrafting Evolvable Api Responses
Crafting Evolvable Api Responses
 
AngularJS and SPA
AngularJS and SPAAngularJS and SPA
AngularJS and SPA
 
Douglas Crockford: Serversideness
Douglas Crockford: ServersidenessDouglas Crockford: Serversideness
Douglas Crockford: Serversideness
 
hw2.docxHomework #2Please complete the homework problems on th.docx
hw2.docxHomework #2Please complete the homework problems on th.docxhw2.docxHomework #2Please complete the homework problems on th.docx
hw2.docxHomework #2Please complete the homework problems on th.docx
 
Data herding
Data herdingData herding
Data herding
 
Data herding
Data herdingData herding
Data herding
 
[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC[Coscup 2012] JavascriptMVC
[Coscup 2012] JavascriptMVC
 
JavaScript Abstraction
JavaScript AbstractionJavaScript Abstraction
JavaScript Abstraction
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
 
Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalGap. How to create native application for mobile devices based on Drupa...DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalGap. How to create native application for mobile devices based on Drupa...
 
DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalGap. How to create native application for mobile devices based on Drupa...DrupalGap. How to create native application for mobile devices based on Drupa...
DrupalGap. How to create native application for mobile devices based on Drupa...
 
Introducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.jsIntroducing the Seneca MVP framework for Node.js
Introducing the Seneca MVP framework for Node.js
 
20120816 nodejsdublin
20120816 nodejsdublin20120816 nodejsdublin
20120816 nodejsdublin
 
Fast REST APIs Development with MongoDB
Fast REST APIs Development with MongoDBFast REST APIs Development with MongoDB
Fast REST APIs Development with MongoDB
 
Build Web Apps using Node.js
Build Web Apps using Node.jsBuild Web Apps using Node.js
Build Web Apps using Node.js
 
Secrets of JavaScript Libraries
Secrets of JavaScript LibrariesSecrets of JavaScript Libraries
Secrets of JavaScript Libraries
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Developing web-apps like it's 2013
Developing web-apps like it's 2013Developing web-apps like it's 2013
Developing web-apps like it's 2013
 

More from contact41

Make sure its correct for a thumbs up! Thank you! 6. Suppose the qu.pdf
Make sure its correct for a thumbs up! Thank you! 6. Suppose the qu.pdfMake sure its correct for a thumbs up! Thank you! 6. Suppose the qu.pdf
Make sure its correct for a thumbs up! Thank you! 6. Suppose the qu.pdf
contact41
 
Joe and Jessie are married and have one dependent child, Lizzie. L.pdf
Joe and Jessie are married and have one dependent child, Lizzie. L.pdfJoe and Jessie are married and have one dependent child, Lizzie. L.pdf
Joe and Jessie are married and have one dependent child, Lizzie. L.pdf
contact41
 
In this lab, we will write an application to store a deck of cards i.pdf
In this lab, we will write an application to store a deck of cards i.pdfIn this lab, we will write an application to store a deck of cards i.pdf
In this lab, we will write an application to store a deck of cards i.pdf
contact41
 
In September 2016, the bodies of two children and their father were .pdf
In September 2016, the bodies of two children and their father were .pdfIn September 2016, the bodies of two children and their father were .pdf
In September 2016, the bodies of two children and their father were .pdf
contact41
 
Im looking for coding help I dont really need this to be explained.pdf
Im looking for coding help I dont really need this to be explained.pdfIm looking for coding help I dont really need this to be explained.pdf
Im looking for coding help I dont really need this to be explained.pdf
contact41
 
Node file code below#ifndef NODE_H#define NODE_H#include .pdf
Node file code below#ifndef NODE_H#define NODE_H#include .pdfNode file code below#ifndef NODE_H#define NODE_H#include .pdf
Node file code below#ifndef NODE_H#define NODE_H#include .pdf
contact41
 

More from contact41 (14)

Need to elaborate on this discussion post Marvin Mower (MM) has t.pdf
Need to elaborate on this discussion post Marvin Mower (MM) has t.pdfNeed to elaborate on this discussion post Marvin Mower (MM) has t.pdf
Need to elaborate on this discussion post Marvin Mower (MM) has t.pdf
 
Manufacturing and service operations can be divided into different t.pdf
Manufacturing and service operations can be divided into different t.pdfManufacturing and service operations can be divided into different t.pdf
Manufacturing and service operations can be divided into different t.pdf
 
Make sure its correct for a thumbs up! Thank you! 6. Suppose the qu.pdf
Make sure its correct for a thumbs up! Thank you! 6. Suppose the qu.pdfMake sure its correct for a thumbs up! Thank you! 6. Suppose the qu.pdf
Make sure its correct for a thumbs up! Thank you! 6. Suppose the qu.pdf
 
John Stewart was a political candidate running for the Garden Hills .pdf
John Stewart was a political candidate running for the Garden Hills .pdfJohn Stewart was a political candidate running for the Garden Hills .pdf
John Stewart was a political candidate running for the Garden Hills .pdf
 
Joe and Jessie are married and have one dependent child, Lizzie. L.pdf
Joe and Jessie are married and have one dependent child, Lizzie. L.pdfJoe and Jessie are married and have one dependent child, Lizzie. L.pdf
Joe and Jessie are married and have one dependent child, Lizzie. L.pdf
 
In the current ever-evolving landscape of higher education, the Univer.pdf
In the current ever-evolving landscape of higher education, the Univer.pdfIn the current ever-evolving landscape of higher education, the Univer.pdf
In the current ever-evolving landscape of higher education, the Univer.pdf
 
In this lab, we will write an application to store a deck of cards i.pdf
In this lab, we will write an application to store a deck of cards i.pdfIn this lab, we will write an application to store a deck of cards i.pdf
In this lab, we will write an application to store a deck of cards i.pdf
 
Imagine youre part of a security team of a startup that is creating.pdf
Imagine youre part of a security team of a startup that is creating.pdfImagine youre part of a security team of a startup that is creating.pdf
Imagine youre part of a security team of a startup that is creating.pdf
 
In September 2016, the bodies of two children and their father were .pdf
In September 2016, the bodies of two children and their father were .pdfIn September 2016, the bodies of two children and their father were .pdf
In September 2016, the bodies of two children and their father were .pdf
 
Imagine you are a cybersecurity consultant tasked with designing aut.pdf
Imagine you are a cybersecurity consultant tasked with designing aut.pdfImagine you are a cybersecurity consultant tasked with designing aut.pdf
Imagine you are a cybersecurity consultant tasked with designing aut.pdf
 
Im looking for coding help I dont really need this to be explained.pdf
Im looking for coding help I dont really need this to be explained.pdfIm looking for coding help I dont really need this to be explained.pdf
Im looking for coding help I dont really need this to be explained.pdf
 
I. Common stocks increase. III. Accounts .pdf
I.   Common stocks increase.                         III.  Accounts .pdfI.   Common stocks increase.                         III.  Accounts .pdf
I. Common stocks increase. III. Accounts .pdf
 
Node file code below#ifndef NODE_H#define NODE_H#include .pdf
Node file code below#ifndef NODE_H#define NODE_H#include .pdfNode file code below#ifndef NODE_H#define NODE_H#include .pdf
Node file code below#ifndef NODE_H#define NODE_H#include .pdf
 
I. Inventories increase. III. Accounts rece.pdf
I.   Inventories increase.                     III.  Accounts rece.pdfI.   Inventories increase.                     III.  Accounts rece.pdf
I. Inventories increase. III. Accounts rece.pdf
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Recently uploaded (20)

This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 

Im writing an abstract class in java right now for this json file a.pdf

  • 1. I'm writing an abstract class in java right now for this json file and I'm not too sure why my code is wrong. 7 usages int numMember; // number of members in Department 9 usages int numProject; // number of currently working projects 2 usages private Project[] projects; // currently working projects 1 usage private Employee[] members; // employees working in the department 7 usages Employee leader; // leader of department 6 usages public Department(int numMember, int numProject, Project[] projects, Employee[] members, Employee leader) { this. numMember = numMember; this.numProject = numProject; this.projects = projects; this.members = members; this. .eader = leader; } 6 implementations public abstract void displayDetails(); 4 implementations abstract void addProjects(Project newProject); // more attributes if necessary class Mobile extends Department { public Mobile(int numMember, int numProject, Project[] projects, Employee[] members, Employee leader) { super(numMember, numProject,projects, members, leader); // more attributes if necessary class Mobile extends Department { public Mobile(int numMember, int numProject, Project[] projects, Employee[] members, Employee leader) { super (numMember, numProject, projects, members, leader); } @override public void displayDetails() { System.out.println("Members: " + numMember); System.out.println("Number of Projects: " + numProject); System.out.println("Leader: " + leader); } Qoverride void addProjects(Project newProject) { projects [numProject ]= newProject; numProject++; System.out.println("Project added to Mobile Department: " + newProject.getProjectName()); } } "Name": "ACE Company", "Year": "2001", "CEO": "Ontaria Laker", "Number of Departments": 6, "Number of Employees": 7, "Departments": [ { "Name": "Mobile", "Leader": "David Collins", "Number of Current Working Projects": 1, "Projects": ["ACE App"] },{ "Name": "Test", "Leader": "Alice Wonderland", "Number of Current Working Projects": 0 , "Projects": [] },{ "Name": "Game", "Leader": "Hulk Hogan", "Number of Current Working Projects": 1, "Projects": ["Ace Ventura"] },{ "Name": "Web", "Leader": "Bruce Duster", "Number of Current Working Projects": 3, "Projects": ["ACE Platform", "ACE App", "ACE Support"] },{ "Name": "Maintenance", },{ "Name": "Maintenance", "Leader": "Donald Kennedy", "Number of Current Working Projects": 2, "Projects": ["ACE Platform", "ACE Support"] },{ "Name": "Service", "Leader": "Lauren Liu", "Number of Current Working Projects": 1, "Projects": ["ACE Support"] } },{ "Name": "Maintenance", "Leader": "Donald Kennedy", "Number of Current Working Projects":
  • 2. 2, "Projects": ["ACE Platform", "ACE Support"] },{ "Name": "Service", "Leader": "Lauren Liu", "Number of Current Working Projects": 1, "Projects": ["ACE Support"] }