Draw a flowchart and write the pseudocode to represent the logic of a program that allows a
Question:
Draw a flowchart and write the pseudocode to represent the logic of a program that allows a user to enter a value for the width and length of a room in feet. The program outputs the area of the room in square feet.
The flowchart can be created using Microsoft Word. You will add screenshots of Parts 2 and 3 to this document. Save the document with the name "Week 3 [your last name}"
PART 2. Class Exercise
Study the code below and note how static variables are declared. Also, notice the scope of each variable within the code. Then, enter and execute the code below:
//Save this code as StaticInitializationBlock.java
class A
{
static int i;
static
{
System.out.println(1);
i = 100;
}
}
public class StaticInitializationBlock
{
static
{
System.out.println(2);
}
public static void main(String[] args)
{
System.out.println(3);
System.out.println(A.i);
}
}
Question: What does the order of execution (when each variable was printed) show you about scope?
Submit a screenshot of the code and the output, showing it executed without errors. Include your answer to the question above.
Part 3: Class Objects
Study the following code, noting how an instance of a class is created. Then, enter and execute the following code:
public class Student
{
int id;//data member (instance variable)
String name;//data member(also instance variable)
String course;//data member (instance variable)
public static void main(String args[])
{
Student s1=new Student();//creating an object of Student
s1.id=123456789;
s1.name="Some student";
s1.course="your course";
System.out.println(s1.id);
System.out.println(s1.name);
System.out.println(s1.course);
}
}
Now, modify the code to output the following information:
Student ID: 987654321
Student name: (your name)
Course: IS 122-7 Programming Logic with Java
Submit a screenshot of your modified code, showing it executed without errors.
Test your results: Using an online Programming Text Editor and Compiler from Coding Ground athttps://www.tutorialspoint.com/compile_java_online.php(Links to an external site.), enter and run the following program. Take a screenshot of your results. You will need to change your code so that the results will display "Your name and the name of your Class: for example, "Jane Doe, 1S122 Programming Logic." Take a screenshot of the updated code and your result display. Insert your screenshots in your assignment Word doc and SUBMIT in this assignment area.