Question
I need help in creating a testcode for this pseudocode in Java.
For following questions, please provided your solutions for each of the questions ina separate Word document. 1. Write pseudo
0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

import java.util.Scanner;
public class Test{

public static void main(String []args){
Scanner sc = new Scanner(System.in);
  
double cost,total=0.0,totalCost;
for(int i=1;i<=5;i++)
{
System.out.println("Enter number of classrooms in class "+i);
int numberOfStudents=sc.nextInt();
cost=numberOfStudents*900.0;
System.out.println("Cost of class "+i+" is $"+cost);
total=total+cost;
}
totalCost=total+(0.65)*total;
System.out.println("Total Cost of classes are $"+totalCost);
  
  
}
}

Execute!!> Share Source File STDIN I.lh Result import java.util.Scann 2 public clss Test 3 er; $javac Test.java $java -Xmx128

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
I need help in creating a testcode for this pseudocode in Java. For following questions, please...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I NEED A FLOW CHART FOR THIIS. Create a pseudocode design to prompt a student for...

    I NEED A FLOW CHART FOR THIIS. Create a pseudocode design to prompt a student for their Student ID and the titles of the three classes they want to add. The solution should display the Student’s ID and a total bill. • Bill a student using the following rules: o Students can only add up to 3 classes at a time. o Each class costs $150.00 o A 5% technology fee is added to the total cost. o If the...

  • The questions blacked out i do not need answered, the last word on question 8f is...

    The questions blacked out i do not need answered, the last word on question 8f is "classrooms" Assignment 6 Worksheet Assignment 6 Worksheet 7. The table below shows how the number of university classrooms cleaned in an evening varies with the number of janitors: Janitors per evening DIBA0 Classrooms cleaned prevo d Marginal Product slapen Margint Variabidest Average Variable You can fill in the Marginal Products from the information given. a. What is the marginal product of the second janitor?...

  • I need help with this java project and please follow the instruction below. thank Class Project...

    I need help with this java project and please follow the instruction below. thank Class Project - Parking Ticket simulator Design a set of classes that work together to simulate a police officer issuing a parking ticket. Design the following classes: •           The ParkedCar Class: This class should simulate a parked car. The class’s responsibilities are as follows: – To know the car’s make, model, color, license number, and the number of minutes that the car has been parked. •          ...

  • Can you please help me with creating this Java Code using the following pseudocode? Make Change C...

    Can you please help me with creating this Java Code using the following pseudocode? Make Change Calculator (100 points + 5 ex.cr.)                                                                                                                                  2019 In this program (closely related to the change calculator done as the prior assignment) you will make “change for a dollar” using the most efficient set of coins possible. In Part A you will give the fewest quarters, dimes, nickels, and pennies possible (i.e., without regard to any ‘limits’ on coin counts), but in Part B you...

  • 12p I need help this is Python EXCEPTIONS: It's easier to ask forgiveness than permission. Try...

    12p I need help this is Python EXCEPTIONS: It's easier to ask forgiveness than permission. Try the code and catch the errors. The other paradigm is 'Look before you leap' which means test conditions to avoid errors. This can cause race conditions. 1.Write the output of the code here: class MyError(Exception): pass def notZero(num): if num == 0: raise MyError def run(f): try: exec(f) except TypeError: print("Wrong type, Programmer error") except ValueError: print("We value only integers.") except Zero Division Error:...

  • I need some help creating C++ Left, Center, Right (LCR) dice game Pseudocode. Address the following : A. Analyze the giv...

    I need some help creating C++ Left, Center, Right (LCR) dice game Pseudocode. Address the following : A. Analyze the given problem statement. B. Break the problem down into distinct steps of pseudocode that will solve the problem. C. Create variables to track the various elements in the pseudocode. D. If applicable, determine any breakdown of pseudocode into functions and/or classes. E. Use natural language to work through the problems. Using three special dice and player pieces called chips. In...

  • I need help with my homework please. I should write this program in C++ language and...

    I need help with my homework please. I should write this program in C++ language and use Inventory.h file (header file), Inventory.cpp file (implementation file), and main.cpp file (main program). This is the program: Demonstrate the class in a driver program. Input validation, don’t accept negative values for item number, quantity, or cost. 6. Inventory Class Design an Inventory class that can hold information and calculate data for items ma retail store's inventory. The class should have the following private...

  • .Need code for my java class !! Write a simple java program that uses loops. You...

    .Need code for my java class !! Write a simple java program that uses loops. You may use ‘WHILE’ or ‘FOR’ or ‘DO-WHILE’ – you decide. The program should use a loop to compute the semester average for up to 5 students. In the loop the user will ask for a student name and their 3 test scores and add them up and divide the total by 3 giving the semester average. You will print out the student name and...

  • *Java* Hi. I need some help with creating generic methods in Java. Write a program GenMethods...

    *Java* Hi. I need some help with creating generic methods in Java. Write a program GenMethods that has the following generic methods: (1) Write the following method that returns a new ArrayList. The new list contains the nonduplicate (i.e., distinct) elements from the original list. public static ArrayList removeDuplicates(ArrayList list) (2) Write the following method that shuffles an ArrayList. It should do this specifically by swapping two indexes determined by the use of the random class (use Random rand =...

  • I need help with this python programming exercise, please! thanks in advance Create a Python script...

    I need help with this python programming exercise, please! thanks in advance Create a Python script file called hw4.py. Add your name at the top as a comment, along with the class name and date. Both exercises should be in this file, with a comment before each of them to mark it. Ex. 1. Write a program that inputs an integer number from the user, then prints a letter "O" in ASCII art using a width of 5 and the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT