---+First Program ---++Learning Objective(s) 1. Get the environment up and working 1. 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 <b>ESSENTIAL</B> that you <b>ONLY</b> 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. a. Step one is to redeem the coupon. Be <b>EXTREMELY</b> careful about how you are logged in with your browser! a. Create a project in the csc121sp2023 folder using your name a. invoke the shell a. enter: <b> gcloud config set project <i>{your project id (not name)}</i></b> a. enter the following <pre> gloud compute instances create {YOUR INSTANCE NAME} \ --image-project csc121s2023classproject --image csc121s2023windows </pre> 1. 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 1. Launch !JGrasp ---+++Part Two 1. In the CSC121 folder, you will find a program entitled !CircleArea.java. Load it into !JGrasp 1. Change the name of the class to !ConvertToCelsius and resave it as !ConvertToCelsiusjava 1. Change the code so that instead of getting a radius from the user, it gets the temperature in Fahrenheit. 1. Change the code so that it outputs the temperature in Celsius. 1. Add your name to banner comment as the modifier of the code 1. Save it 1. Test it and make sure it works 1. Once it works a. create a document that contains your name, what data you used to test it with and what results you got for each data. a. create a pdf document from that document a. create an empty zip folder a. place !ConvertToCelsius.java into it a. place your pdf document into it a. 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. Allow the user to specify which direction (Fahrenheit to Celsius or Celsius to Fahrenheit) and output the appropriate result.
This topic: CenterForComputing
>
WebHome
>
Syllabi
>
CSC121SylS2023
>
CSC121S2023Lab01
Topic revision: r2 - 2023-01-05 - cathybareiss
Copyright © 2008-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback