Question

In: Computer Science

"You will need to compile each Java source file (provided below) separately, in its own file...

"You will need to compile each Java source file (provided below) separately, in its own file since they are public classes, to create a .class file for each, ideally keeping them all in the same directory."

My class is asking me to do this and i am not understanding how to do it. I use JGRASP for all of my coding and i can't find a tutorial on how to do it. I just need a step by step tutorial on how to do this inheritance thing on JGRASP.

Solutions

Expert Solution

Wherever your .java files are kept, if you run the command: "javac *.java", then all your classes will be compiled and the .class files will be created in the directory..

i had 2 files Alien.java and AlientDatabase.java.. When i ran javac *.java, 2 additional files for .class got created.. As you can see in the images.
**************************************************

Thanks for your question. We try our best to help you with detailed answers, But in any case, if you need any modification or have a query/issue with respect to above answer, Please ask that in the comment section. We will surely try to address your query ASAP and resolve the issue.

Please consider providing a thumbs up to this question if it helps you. by Doing that, You will help other students, who are facing similar issue.


Related Solutions

I NEED IT PRINT IN THIS FORM JAVA How is a Java source file executed? 1....
I NEED IT PRINT IN THIS FORM JAVA How is a Java source file executed? 1. It is compiled and runs natively 2. It is interpreted but not compiled 3. It is compiled into byte code and executed by the Java Virtual Machine 4. It is magic Please enter your answer 1 Sorry that answer is not correct. The correct answer is 3 Correct output: How is a Java source file executed? 1. It is compiled and runs natively 2....
C++ If you tried to compile a source file that doesn't contain a main() function, would...
C++ If you tried to compile a source file that doesn't contain a main() function, would this error be detected by the preprocessor, the compiler, or the linker? Briefly justify your answer. Hint: think about how the files that don't have main() get processed in a project with multiple files. Alternatively, try it out and look at the error message you get.
Using the provided Java program below, complete the code to do the following. You may need...
Using the provided Java program below, complete the code to do the following. You may need to create other data items than what is listed for this assignment. The changes to the methods are listed in the comments above the method names. TODO comments exist. Apply any TODO tasks and remove the TODO comments when complete. Modify the method findMyCurrency() to do the following:    a. Use a do-while loop b. Prompt for a currency to find. c. Inside this...
***The code is provided below*** When trying to compile the code below, I'm receiving three errors....
***The code is provided below*** When trying to compile the code below, I'm receiving three errors. Can I get some assistance on correcting the issues? I removed the code because I thought I corrected my problem. I used #define to get rid of the CRT errors, and included an int at main(). The code compiles but still does not run properly. When entering the insertion prompt for the call details, after entering the phone number, the program just continuously runs,...
I need to update this java program to take input about each employee from a file...
I need to update this java program to take input about each employee from a file and write their information and salary/pay information to a file. use input file payroll.txt Kevin Yang 60 20 Trey Adams 30 15 Rick Johnson 45 10 Cynthia Wheeler 55 11.50 Sarah Davis 24 10 Muhammad Rabish 66 12 Dale Allen 11 18 Andrew Jimenez 80 15 import java.util.Scanner; public class SalaryCalcLoop { double Rpay = 0, Opay = 0; void calPay(double hours, double rate)...
/* WordList source file * * *   This file will contain the function definitions you will...
/* WordList source file * * *   This file will contain the function definitions you will implement. *   The function signitures may NOT be changed. You may create your own *   helper functions and include them in this file. * *   In addition to the specific instructions for each function, no function *   should cause any memory leaks or alias m_list in any way that would result *   in undefined behavior. * *   Topics: Multilevel Pointers, Dynamic Allocation, Classes *...
Each of parts (a) to (e) below contain separate statements that you are required to answer separately.
Each of parts (a) to (e) below contain separate statements that you are required to answer separately. For each of the statements indicate whether it is TRUE or FALSE and briefly explain your reasons with reference to legislation, case law or rulings (as appropriate).A taxpayer with an Australian domicile will not always be considered a tax resident of Australia.The second positive limb for the general deductions provision in section 8-1(1)(b) ITAA97 imposes a stricter nexus test than for the first...
Get the file “HW4Short.java”. Compile it and look at its bytecode. [TO DO:] Write a step-by-step...
Get the file “HW4Short.java”. Compile it and look at its bytecode. [TO DO:] Write a step-by-step description of the bytecode, imitating the style of my explanation in problem 1. Explantionin promblem1: 0 iconst_0 push constant 0 onto the stack 1 istore_1 pop stack and store in location 1 (sum = 0) 2 iconst_0 push constant 0 onto the stack 3 istore_2 pop stack and store in location 2 (i = 0) 4 iload_2 push contents of location 2 onto stack...
JAVA * This is a skeleton file. Complete the functions below. You * may also edit...
JAVA * This is a skeleton file. Complete the functions below. You * may also edit the function "main" to test your code. * * You should not use any loops or recursions. Your code needs to run in * constant time. It is OK if your testing code has loops (like in checkInvariants). * * You must not add fields or static variables. As always, you must not change * the declaration of any method nor the name of...
Can you provide source code in Java that 1. accepts a two-way acceptor via file; 2....
Can you provide source code in Java that 1. accepts a two-way acceptor via file; 2. and validate if the input string is part of the language
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT