First Program

18 Jan 2022 - 13:10 | Version 1 |

Learning Objective(s)

  1. Get the environment up and working
  2. Enter your first program

Overview of the Program

This lab has two parts. Part one is to create a virtual machine in which you will store all work for this class. Part two is to edit a program to change its functionality a little.

Specifics

Part One

For this part it is ESSENTIAL that you ONLY use your betheluniversity.edu account! Any other account (including a google account) will cause major problems!
  1. Follow the instructions to create your virtual machine.
  2. Remote into it from any machine using remote access. If you are on a Mac, you might need to download an app to allow the Mac to remote into a virtual Windows machine
  3. Launch JGrasp

Part Two

  1. In the CSC121 folder, you will find a program entitled CircleArea.java. Load it into JGrasp
  2. Change the name of the class to RectArea and resave it as RectArea.java
  3. Change the code so that instead of getting a radius from the user, it gets two numbers: height and width
  4. Change the code so that it outputs the area of a rectangle instead of a circle.
  5. Add your name to the author as the modifier of the code
  6. Save it
  7. Test it and make sure it works
  8. Once it works
    1. create an empty zip folder
    2. place RectArea.java into it
    3. submit the zip folder on canvas

Optional improvements

Optional improvements should ONLY be worked on once the program is completing working. In addition, the work is to be done on your own with little if any help for lab assistants or the instructor.
  1. Have it compute the area of three different shapes
  2. Have it reject any negative number
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
This website is using cookies. More info. That's Fine