SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 5 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 12 Oct 2017 My Price 10.00

How do i start this problem? specifically with the second and third point for problem1.

Northeastern Illinois UniversityCS200, Programming I, Fall 2017Homework 4Due date: Wednesday 9/27/2017 at 10:00 a.m.Problem 1:Create a class named Problem1, the program would do the following:-The program should have amainmethod, for now, just leave it empty.-Create a method namedgetRandomNumber, which takes two integer parameters namedxandy,the method returns anintegerin the range ofxtoy(both inclusive).-Go back to themainmethod and prompt the user to enter two integerslowerandupper, invokethegetRandomNumbermethod and passlowerandupperas parameters, then print the returnedvalue.-Below are two sample runs,NOTEthat since those are randomly generated number, your results willbe different than the sample outputs.-Copy the output to a text file named Problem1.txtEnter an integer for lower:10Enter another integer for upper(greater than lower):2518Enter an integer for lower:4Enter another integer for upper(greater than lower):125Enter an integer for lower:100Enter another integer for upper(greater than lower):250173
Background image of page 1
Problem 2:-What is theexactoutput for the program below?-Print and use the tracing worksheet provided on the next page. You are required to tracethe program by hand, and show your work as well as the output on the tracing worksheet.-Scan the tracing worksheet, then save it as.pdffile.-Your output should go in the output box provided on the next page.public classProblem2{public static doublemethodA(doublea,doubleb){a *= 2;b += 0;return3 * a + b / 2;}public static intmethodB(inta,intb){intr;System.out.println("Method practice!");if(12 > a){r = 3;System.out.println("What's the purpose of methodC?");}else if(a % 2 == 0){r = 222;}else{r = 3 * a;}returnr;}public static voidmethodC(){System.out.println("I print Hi");}public static voidmethodD(){System.out.println("I print Bye");}public static voidmain(String[] args){intx = 22, y = 8, k = 29;doublez = 7;System.out.print("METHODS ");System.out.println(methodB(y, k));methodC();System.out.println(methodA(10, 25));System.out.println(methodA(x, z));System.out.println(methodB(x, (int)4.5));methodD();}}
Background image of page 2

Attachments:

Answers

(5)
Status NEW Posted 12 Oct 2017 10:10 AM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)