Write a program that calculates number of characters in line

Assignment Help Basic Computer Science
Reference no: EM131396419

The number of lines that can be printed on a paper depends on the paper size, the point size of each character in a line, whether lines are doublespaced or single-spaced, the top and bottom margin, and the left and right margins of the paper. Assume that all characters are of the same point size, and all lines are either single-spaced or double-spaced. Note that 1 inch ¼ 72 points. Moreover, assume that the lines are printed along the width of the paper. For example, if the length of the paper is 11 inches and the width is 8.5 inches, then the maximum length of a line is 8.5 inches. Write a program that calculates the number of characters in a line and the number of lines that can be printed on a paper based on the following input from the user:

a. The length and width, in inches, of the paper.

b. The top, bottom, left, and right margins.

c. The point size of a line.

d. If the lines are double-spaced, then double the point size of each character.

Reference no: EM131396419

Questions Cloud

Provide a detailed summary of 21st century solutions : Your duties at 21st Century Solutions Health Care Hospital require you to interface with many different professionals, including physicians, nurses, and allied professionals in various areas of health care. The facility also has a new information ..
Choose a method of sampling and give the reasons : The investigator would like to make estimates for each class as well as the total body of undergraduates. Choose a method of sampling and give the reasons for your choice.
Review the developmental model of intercultural sensitivity : For this discussion, review the Developmental Model of Intercultural Sensitivity on pages 81-85 of the Learning through Serving text. Which one of these six stages do you find yourself in?
What consequences are there to having a long copyright term : What reasons are there for having copyright terms last this long? What consequences are there to having a long copyright term?
Write a program that calculates number of characters in line : The number of lines that can be printed on a paper depends on the paper size, the point size of each character in a line, whether lines are doublespaced or single-spaced, the top and bottom margin, and the left and right margins of the paper.
Java classes to model a small plane flying passengers : In this assignment, you will be creating several Java classes to model a small plane flying passengers from State College, PA to Orlando, FL.
Take a sample of 25 students from a freshman medical class : You are asked to take a sample of 25 students from a freshman medical class of 180 students in order to find out what specialty they wish to enter.
Discuss the impact of quality improvement on legal aspects : Analyze the pros and cons of the quality improvement program that you are proposing for the organizational process that you identified.Justify the need for this program, and detail all of the program specifics, including a time line from launch to ..
Calculates and prints bill for a cellular telephone company : Your program should prompt the user to enter an account number, a service code (type char), and the number of minutes the service was used. A service code of r or R means regular service; a service code of p or P means premium service. Treat any o..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Relation to information security

For each term that you choose, define it and explain it in relation to Information Security as well as any positive or negative impact it has on the field of IT Security. Terms are: Block storage and ROT(Redundant, outdated, trivial information)

  Why is it significant to project planning

Why is it a good practice to delay naming specific individuals as resources early in the planning process?

  Find out how smtp hosts deal with unknown commands

Find out how SMTP hosts deal with unknown commands from the other side, and how in particular this mechanism allows for the evolution of the protocol (e.g., to “extended SMTP”). You can either read the RFC or contact an SMTP server as in Exercise 14 ..

  Write the polar forms of the equations of two lines

Write the polar forms of the equations of two lines, neither of which is vertical, such that the lines intersect at a 90° angle and have normal segments of length 2

  Differences between lans and wireless lans

Wireless networks have become a pervasive part of society today. Let's focus our discussion on Wi-Fi also known as the IEEE 802.11 standards group. The latest member of the 802.11 family is 802.11n. What are some immediately noticeable differe..

  Project management process always be used for it projects

1. Should Project Management Process always be used for IT projects? Are there cases where it should not be used? List and discuss the advantages, disadvantages, and potential impacts of using PM processes.

  Calculate the volume of paint

Now, Consider a paint made of infinitesimally small molecules. How much paint would be required to paint the surface of the solid thus formed. And then, Calculate the volume of paint that would be required to fill this solid?

  Write a program that generates a random integer

Write a program that generates a random integer in the (inclusive) range [0-9] (i.e. the set {0,1,2,3,4,5,6,7,8,9}) and ask the user to guess what the number is.

  Why we need preprocessing of data

Why we need preprocessing of data? Explain major four data preprocessing techniques?

  Create a world with a wind-up penguin

Create a world with a wind-up penguin. This is actually a penguin (Animals) with a wind Up Key (Objects) positioned against its back. The key is vehicle property has been set to the penguin. In this world, make the penguin waddle (or walk) around ..

  Difference between the follwing pairs

What is the difference between each of the following pairs

  Find the name of the manager of the manager of jones

Find those employees who earn more than all employees living in the city "Mumbai."

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd