Question

In: Computer Science

USING YOUR KNOWLEDGE OF MODULES, REWRITE THE FOLLOWING BATCH OF CODE USING PSEUDOCODE AND CREATE A...

  1. USING YOUR KNOWLEDGE OF MODULES, REWRITE THE FOLLOWING BATCH OF CODE USING PSEUDOCODE AND CREATE A FLOWCHART TO REPRESENT THE LOGIC:

There’s one thing every coder must understand.

The System.out.println command.

There’s one thing every coder must understand.

The System.out.println command.

Solutions

Expert Solution

Ans:- For understanding this, Consider following code:

public class System{

public static final PrintStream out;

.......

}

public class PrintStream{

public void println(){

}

public void println(String s){

}

-----------

many overloaded method

}

Now if we want to use method println() then how it should be called

System.out.println() //depends on its argument

System ->class in java.lang package

out -> PrintStream object reference which is static variable of System class, so access through( System.out)

println() -> Method in PrintStream class which is accessed by out(object reference variable) (System.out.println())

Pseudocode for System.out.println()

Class System

BEGIN

Declare variable for PrintStream as out

Implement other method of class

END

class PrintStream

BEGIN

implement method println()

implement method println(String s)

implement method println(String,operator,other type variable)

---------------------

other overloaded method

END

class Test

Begin

main()

begin

System.out.println("Hello World")// calling method println()

end

END

Flowchart

Please let me know if you have any doubt or modify the answer, Thanks :)


Related Solutions

4. Rewrite the following pseudocode segment using a loop structure in the specified languages: k =...
4. Rewrite the following pseudocode segment using a loop structure in the specified languages: k = (j + 13) / 27 loop:       if k > 10 then goto out       k = k + 1       i = 3 * k - 1       goto loop out: . . . a. C++ b. Python c. Ruby Assume all variables are integer type. Discuss the relative merits of the use of these languages for this particular code.
Using RAPTOR Create a flowchart and create the pseudocode for the following question Le Chef Heureux...
Using RAPTOR Create a flowchart and create the pseudocode for the following question Le Chef Heureux Restaurant has 20 tables that can be reserved at 5 p.m., 7 p.m., or 9 p.m. Design a program that accepts reservations for specific tables at specific times; the user enters the number of customers, the table number, and the time. Do not allow more than four guests per table or invalid table numbers or times. If an attempt is made to reserve a...
Using pseudocode or C++ code, write code to print “small” if the magnitude M of an...
Using pseudocode or C++ code, write code to print “small” if the magnitude M of an earthquake is in the range [0, 3), “medium” if M is in the range [3, 6), “large” if M is in the range [6, 9) and “epic” if M is greater than or equal to 9, where M is input by a user via the keyboard. (in c++)
USING C++ ONLY. Please study the code posted below. the goal is to rewrite the code...
USING C++ ONLY. Please study the code posted below. the goal is to rewrite the code implementing a template class using a linked list instead of an array. Note: The functionality should remain the same. /** * Queue implementation using linked list C style implementation ( no OOP). */ #include <cstdio> #include <cstdlib> #include <climits> #include <iostream> #define CAPACITY 100 // Queue max capacity using namespace std; /** Queue structure definition */ struct QueueType { int data; struct QueueType *...
create flowchart using Flowgorithm and Pseudocode for the following program example:   Design a program for Jones...
create flowchart using Flowgorithm and Pseudocode for the following program example:   Design a program for Jones College. The current tuition is $12,000 per year, and tuition is expected to increase by 5 percent each year. Display the tuition amount for each year over the next five years (use a looping structure).
Rewrite the following text using the correct tone and style to create goodwill. I am writing...
Rewrite the following text using the correct tone and style to create goodwill. I am writing to you because I want to complain about the horrible service that I endured during my stay at your hotel last weekend. The porter took such a long time to send my luggage up to my room and he even dared to ask me for a tip. The air-conditioner was also very noisy, and I could not have my beauty sleep which is very...
2. Program containing two modules: a. Create a class Code one programmer-written constructor Create several instance...
2. Program containing two modules: a. Create a class Code one programmer-written constructor Create several instance data attributes Create 3 methods which will each be invoked from the driver program - one method will not receive any parameters, but will return a value to driver program - one method will receive one parameter, and will also return a value to driver program - a display method will receive 2 parameters from driver program Define a constant properly; use the constant...
write pseudocode for the following problems not c code Pseudocode only Write a C program to...
write pseudocode for the following problems not c code Pseudocode only Write a C program to print all natural numbers from 1 to n. - using while loop Write a C program to print all natural numbers in reverse (from n to 1). - using while loop Write a C program to print all alphabets from a to z. - using while loop Write a C program to print all even numbers between 1 to 100. - using while loop...
Using Matlab, write code that carries out the following instructions: **Within your Live Script, create a...
Using Matlab, write code that carries out the following instructions: **Within your Live Script, create a matrix A by starting with eye(5) and performing the following sequence of elementary row-operations: first, replace (row4) with [(row4) + (row2) ⋅3], then, interchange rows 1 and 3 of the obtained matrix, and, finally, scale row5 of the matrix from the previous step by 6 to get the output matrix A. Display A. Note: To complete this part, you, should, first, create (and output)...
Code in python the grocery receipt the following steps using the knowledge you have. declare a...
Code in python the grocery receipt the following steps using the knowledge you have. declare a string variable called card_number. Assign a value of “xxx8974” declare a string variable called date and assign a string value of “9\7\2020” You need to use an escape sequence for the slashes in this string. See Mosh’s video 2.4-Escape Sequence if needed. You do not need to use a date class variable as we have not learned that data type yet. Use a simple...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT