Answered step by step
Verified Expert Solution
Question
1 Approved Answer
What to hand in: For the programming question, upload .java file to your Canvas account (don't upload .code file). The rubric has been posted
What to hand in: For the programming question, upload .java file to your Canvas account (don't upload .code file). The rubric has been posted to the course website. Programming Task - 100 points This programming task is very, very similar to the code that you wrote, compiled, and executed in the first lab. Refer to that lab for clues. Look over the lecture slides for significant hints as well. The goal of this programming task is for you to gain more practice in writing java code and using jGRASP. 1. 2. 3. Create the folder HW1 in your cs110Submissions folder on your CWU N drive or your home computer. Use that location to work on your code. However, the final submission should be in Canvas (see step 7). Use jGRASP and create a new java file, and name it TodayIs.java. Save it in your HW1 folder. As was shown and discussed in lecture, the structure of your java files for the first part of CS110 should follow the same pattern, namely: public class Today Is { public static void main (String args[]) { } // your code goes here 4. 5. Add comments throughout your code. For example, be sure to include your name and date in a comment at the top of your java file, as was shown in the HelloWorld.java code in lab 1. Inside of the main routine in your java file, declare two variables. Both should be of type int (integer); you decide the names for the variables: The first variable should hold an integer that represents what day of the month is today (8 is used in the example below, but you can change it). The second variable should hold an integer that represents the month of the year for October. CS110, Tatiana Harrison, CWU, HW 1: Introductions Page 1 of 2 After declaring the two variables, invoke the println method three times: Page 1 of 2 The argument for the first println method should be the words "The month is October". The argument for the second print in method should be the words "October is month number ZOOM + After declaring the two variables, invoke the println method three times: The argument for the first println method should be the words "The month is October". 6. . The argument for the second print in method should be the words "October is month number "with the value stored in the second variable appended to it. The argument to the third println should be the words "Today is the "with the value of the first variable appended to it and th day of the month." further appended to it. Compile your program. If your code has syntax errors, fix them until your program compiles. The goal output of your program is the following: The month is October October is month number 10 Today is the 8th day of the month 7. Upload your.java file to Canvas; an assignment has been created especially for it. RUBRIC Item code is commented, along with your name and date at the top of the java file, code is properly formatted 2 variables declared and initialized 3 uses of printin 3rd printin has 3 components program compiles and has correct output Total Points Available 25 20 15 15 25 100 Page 2 of 2 ZOOM +
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Heres a breakdown of what you need to do Create Folder and Java File Create a folder named HW1 in your designated directory Within the HW1 folder crea...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started