Compiled some java programs from scratch

Assignment Help JAVA Programming
Reference no: EM132235732

Installing, Compiling Java

With your coding experience now from both codingame.com and your ZyBook e-text, it is high time you compiled some Java programs from scratch in the Command window (cmd.exe -- WIN) or the Terminal (CTRL-ALT-T -- Unix).

To do so, you may need to download a Java compiler (SDK) to your computer of choice (it is possible this is already installed on the HS104 lab-machines on the Linux-side!).

Homework Instructions:
Type in, compile, and run the Java programs in sections 1 and 2 below.

For each numbered section (> 0):
Paste your final code into your report (this should be identical to the code below; no changes required!)
Take a screenshot of the results of the section's code and paste into your report, along with a paragraph explaining what the code does, and/or why the results came out as they did.

(General install instructions are included below in section 0, if needed!)
Save a copy of your final report in the course TurnIn folder. Turn in a hard-copy of your report in-class on the due-date.

Sections:
0. Java Installation and Program Compile instructions (for WIN)
(Hint: try 0B below first; if javac command not recognized, then do 0A)

A. Install Java SDK
Download the current Java SDK (Software Development Kit) to your machine
Search "download Java JDK" on Google

Find Oracle JDK download section
- (my file was: jdk-8u121-windows-i586.exe)
Note address of default installation directory on your machine
- (e.g. C:\Program Files (x86)\Java\jdk1.8.0_121\)
New binaries directory on your machine:
- C:\Program Files (x86)\Java\jdk1.8.0_121\bin
- Contains javac.exe and java.exe
Verify/Update your system PATH variable with javac.exe's directory
Control Panel: System >> Advanced >> Environment Variables >> PATH >> Edit
- WIN7 and before had semicolon-separated directory-addrs (;) -- with last directory not scolon-terminated!
- WIN10 has a friendlier implementation

B. Compile
? Type and Save a Java class (e.g. #1 below) into a textflie with a .java extension
? Run cmd.exe
? Navigate to your java-file directory (using: cd, dir as needed)
? Compile {fname}.java files to {fname}.class with:
javac {fname}.java

? Run {fname}.class files with:
java {fname}

1. Hello World!
Type and run the following Java program in a single .java-extension textfile (e.g. hello.java):

2. Inheritance Example
Type the following four classes into four individual files.

Attachment:- Compiling your own Java files.rar

Reference no: EM132235732

Questions Cloud

Define megans law in america : Define Megan's Law in America. Go to klaaskids and explain the importance of Megan's Law (your opinions) given the readings and material in the module.
Develop goals and metrics that the organization could use : Considering your company (or a previous one), develop goals and metrics that the organization could use in applying the balanced scorecard technique.
Why would the government use such seemingly careful wording : Why would the government use such seemingly careful wording? When does a unilateral contract become enforceable? When does a bilateral contract.
What artifacts provide clues about the culture : What artifacts provide clues about the culture? How do these cultural elements contribute to or detract from the organization's ability to meet prominent goals.
Compiled some java programs from scratch : HW4 - Installing, Compiling Java - To do so, you may need to download a Java compiler to your computer of choice - compile, and run the Java programs in section
Describe the business managerial issue : Elaborate on a contemporary ethical or management, leadership theory, issue or dilemma, that directly relates to the topics related to this course.
Summarize the takeaways from the articles : Locate three research studies that support the premise that better managers are those who pursue an understanding of the culture and/or climate.
Analyze the phases of the chocolate firm erp system project : Analyze the following phases of the chocolate firm's ERP system project: Steps of the systems implementation and conversion phase.
Create an effective reward system for the organization : Create an effective reward system for this organization. Determine the strategies you would incorporate to motivate employees and influence behavior.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd