+ 1

Package of the Java

Create two packages, CE_Dept & IT_Dept with Machine_Detail_CE and Machine_Detail_IT classes respectively. The class should have a method to display machine information (No_of_PC(int), configuration(String)) for both departments. Write a java application that imports both defined packages and call their methods Anyone can solve this question and share that code with me. And I'm not typed any code regarding this so if you want do then solve it and send it to me.

28th Nov 2022, 4:00 AM
Priyanshi Sutariya
4 odpowiedzi
+ 3
Hint: each package should be in a separate file, in a subdirectory that corresponds to the package name. Package name is usually referring to the organization (reverse domain) or person who authored the code, and the app name. For example package com.sololearn.app; This file would be located in a directory under your project for example: project/java/com/sololearn/app And it contains a class where you define the main method. The filename matches the name of the class. class Application { public static void main... } And you have two other subdirectories like project/java/com/sololearn/app/CE_Dept Which contain the file Machine_Detail_CE.java With the package information: package com.sololearn.app.CE_Dept And in your Application.java you need to import these classes such as import com.sololearn.app.CE_Dept.*; You cannot really test this on Sololearn because we can only compile a single file here.
28th Nov 2022, 6:00 AM
Tibor Santa
Tibor Santa - avatar
+ 1
Attempts?
28th Nov 2022, 5:27 AM
A͢J
A͢J - avatar
+ 1
Thank you for giving the hint
28th Nov 2022, 6:54 AM
Priyanshi Sutariya
0
I have not attempted single time. Give me hint regarding this
28th Nov 2022, 5:33 AM
Priyanshi Sutariya