Due: 2024-09-09 23:59:00EDT
Please fill out this short survey. Your answers will help your instructor get to know you and learn what you hope to get out of this course. This will help me modify the course to best fit your interests.
Watch the following 10-minute video about a growth-mindset.
Then, in a file called GROWTH.txt
, define what a ‘growth mindset’ means to you in your own words. Then, explain how you intend to apply this concept in our class throughout the semester.
How do you think adopting a growth mindset can benefit your learning and performance in this course?
Write a program, Fortune.java
, which prints a fortune like the ones typically found in fortune cookies. Use the program as a starting point.
1. // Name:
2. // Date:
3. // Description: Print a fortune to the console
4.
5. public class Fortune {
6.
7. public static void main(String[] args) {
8. System.out.println("Hello World!"); // todo: your message here
9. }
10. }
You can download Fortune.java
from the course website using the following command:
wget https://bmc-cs-113.github.io/hws/hw00/Fortune.java
Make sure to first cd
(move) into the hw00 directory that you made in Lab00.
You can do so by running:
$ cd cs113/
$ cd homeworks/
$ cd hw00/
Run pwd
to confirm that you are in your hw00/
directory. Then run the wget
command from above.
Below is an example of compiling and running the program in the command line:
$ javac Fortune.java
$ java Fortune
A journey of a thousand miles begins with a single step.
Dont forget: make sure to fill in the header in Fortune.java
.
Programming is very similar to writing. A first draft is always messy. Its no
different when programming, you’ll make plenty of mistakes when first writing
any program. A nice thing about programming is that the compiler is your friend who will tell you the mistakes that you’ve made.
First delete the binary file (Fortune.class
) that was created when you compiled Fortune.java
.
In this part of the assignment, we are going to make some mistakes on purpose. For each of the following changes 1) copy the error message you see when compiling the program and 2) a simple explanation of what you think that message might mean. If the program compiles, try running it.
Save your answers in a new file called ERRORS.txt
. After making each edit listed below, revert the edit so that the file is the same as when you ended the last part of this assignment.
;
at the end of line 8.Fortune
in line 5 to fortune
.main
to blah
in line 7.}
in line 10.}
in line 9.Read Computer Science: Not about Computers, Not Science.
In a new file called HW00_READING.txt
answer the following questions:
Submit the following files to the assignment called HW00
on Gradescope:
GROWTH.txt
Fortune.java
ERRORS.txt
HW00_READING.txt
Make sure to name these files exactly what we specify here. Otherwise, our autograders might not work and we might have to take points off. DO NOT submit a .docx or .pdf file.
You will likely want to submit the files from your own laptop/computer.
To copy the files from goldengate
to your own machine,
open up a terminal on your own computer. If you have a mac or linux, you can use the
Terminal application, if you have a windows you can use the Powershell app.
Run the following command:
$ scp -r <username>@goldengate.cs.brynmawr.edu:/home/<username>/cs113/homeworks/hw00/ .
Make sure to replace <username>
with your username. scp
is a command to secure-copy files
from one server to another. In this case, from goldengate
to your own machine.