1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
OLga [1]
3 years ago
7

I need help in creating a Java Program; To calculate the chapter from which you solve the programming exercise, below are the re

quirements;
• Divide the integer number representing your student ID by 4, consider the remainder and increment it by 2. The result you obtain represents the chapter number, and it should be either 2, 3 , 5 or 6.

* Depending on the chapter number obtained above, consider the following rules in calculating the problem number to solve:

• If the chapter number is 2, divide your student ID by 23, consider the remainder and increment it by 1. The result you obtain represents the number of the programming exercise you will solve for online discussions, which should be from chapter 2.

• If the chapter number is 3, divide your student ID by 34, consider the remainder and increment it by 1. The result you obtain represents the number of the programming exercise you will solve for online discussions, which should be from chapter 3.

• If the chapter number is 4 (you need to go to chapter 6), divide your student ID by 38, consider the remainder and increment it by 1. The result you obtain represents the number of the programming exercise you will solve for online discussions, which should be from chapter 6.

• If the chapter number is 5, divide your student ID by 46, consider the remainder and increment it by 1. The result you obtain represents the number of the programming exercise you will solve for online discussions, which should be from chapter 5.

*After calculating the number of the chapter, and the number of the programming exercise to solve, ask the user to enter the page number where the specific problem is located in the textbook. Display the requirement for the programming exercise using the following format: "Please solve programming exercise … (include here the number of the exercise) from chapter … (include here the number of the chapter), from page … (include here the page number)."
Computers and Technology
1 answer:
Vinvika [58]3 years ago
8 0

Answer:

 public static void main(String[] args)

 {

   int studentnumber = 123456;

   int divisor = 0;

   int chapter = (studentnumber%4)+2;

   

   switch(chapter) {

     case 2:

      divisor = 23;

      break;

     case 3:  

      divisor = 34;

       break;

     case 4:

      divisor = 38;

       break;

     case 5:  

      divisor = 46;

       break;

   }

   

   int exercise = (studentnumber % divisor) + 1;

   

  System.out.printf("Studentnumber %d divided by 4 plus 2 is chapter %d.\n", studentnumber, chapter);        

  System.out.printf("Studentnumber %d divided by %d is exercise %d.", studentnumber, divisor, exercise);  

 }

Explanation:

Above is just a bit of code to get you started with the first part. Hope you can figure out the rest.

You might be interested in
What is a user interface have? Plz answer ASAP!!!!!
konstantin123 [22]

Put simply, a user interface is the point of human-computer interaction and communication on a device, webpage, or app. This can include display screens, keyboards, a mouse, and the appearance of a desktop.

5 0
3 years ago
Read 2 more answers
a mobile base in an urban environment has the power of 15 microW at 175 m. If the propagation follows an inverse cube power law,
Evgen [1.6K]

Answer: Power P at distance 0.7 km is: 0.234 µW

Explanation:

We know that

inverse cube-power law.

Thus Power, P = c / d³

Substituting we have

15 µW = c / (175 m)³

c = (15 µW) x (175 m)³

Then finally Power value at 0.7 km.

Will be

P = c / d³

P = ((15 µW) x (175 m)³) / (700 m)³

= (15 µW) x (175 / 700)³

= (15 µW) x (0.25)³

=(15 µW) x (0.015625)

P = 0.234 µW

8 0
4 years ago
Which tool will be useful in darkening a subject’s hair color in a photograph? A.Dodge tool B.Burn tool C.Patch tool D.Blur tool
choli [55]
It's B. The burn tool darkens stuff. The dodge tool lightens stuff. hope this helps, have an amazing day :)
8 0
4 years ago
Read 2 more answers
Software piracy is acceptable as it helps us obtain software cheaper or sometimes even for free.
ELEN [110]

Answer: 1. False 2. True

Explanation: Piracy in any capacity is in fact illegal and might possibly be a felony I'm not quite sure. But it's just like stealing a toy from the store, somebody worked hard to make it and you best be paying for it.

Software licenses on the other hand usually give you permission to install the software on one or many machines depending on the license you purchase, but usually, if you paid for it once, you can use it anywhere.

8 0
3 years ago
Read 2 more answers
Digital Blank______ track KPIs and CSFs by compiling information from multiple sources and tailoring it to meet user needs. Mult
aleksklad [387]

Digital Dashboard track KPIs and CSFs by compiling information from multiple sources and tailoring it to meet user needs.

<h3>What are digital dashboard?</h3>

This is known to be a kind of  an analysis tool that helps a lot of business men and women to be able to examine and analyze their most vital data sources in real time.

Note that Digital Dashboard track KPIs and CSFs by compiling information from multiple sources and tailoring it to meet user needs.

Learn more about digital dashboard from

brainly.com/question/14383144

#SPJ1

3 0
2 years ago
Other questions:
  • The user can set their own computer hostname and username. Which stage of the hardware lifecycle does this scenario belong to?
    6·1 answer
  • When do you use FTP?
    10·2 answers
  • Will technology be the destruction or salvation of human-kind
    13·2 answers
  • my I phone is in recovery mode and when I connect to my PC the I device is not connected to iTunes although i have the latest ve
    7·2 answers
  • What is dialog box? ​
    7·1 answer
  • Use the drop-down menus to match the description to the correct audio-editing technique or term. deleting unwanted sounds increa
    14·2 answers
  • All the network nodes are connected to each other
    8·1 answer
  • What is the best resource to learn python?
    14·2 answers
  • The four differences between binary and denary​
    13·1 answer
  • Which statements are TRUE about web services protocols? (Select TWO responses) SOAP and REST are both web service communication
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!