All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
programming logic & design
Questions and Answers of
Programming Logic & Design
You might want to use these files in any of several ways: You can look at the file contents to better understand the types of data each program uses.You can use the file contents as sample data when
Complete the following tasks:a. Create a class for a cell phone service named Message that includes a field for the price of the message. Create get and set methods for the field.b. Derive three
Which is the better tool for learning programming—flowcharts or pseudocode? Cite any educational research you can find.
What is the image of the computer programmer in popular culture? Is the image different in books than in TV shows and movies? Would you like that image for yourself?
Many programming style guides are published on theWeb.These guides suggest good identifiers, explain standard indentation rules, and identify style issues in specific programming languages. Find
What advantages are there to requiring variables to have a data type?
As this chaptermentions, some programming languages require that named constants are assigned a value when they are declared; other languages allow a constant's value to be assigned later in a
Many products use Pascal casing or camel casing in their names–for example, MasterCard. Name as many more as you can.
Distance measurement is one situation in which using integer division and the remainder operator might be useful. For example, if the programming language supports it, you can divide a measurement of
Would you prefer to write a large program by yourself, or to work on a team in which each programmer produces one or more modules? Why?
Extreme programming is a system for rapidly developing software. One of its tenets is that all production code is written by two programmers sitting at one machine. Is this a good idea? Does working
Draw the hierarchy chart and design the logic for a program that calculates the projected cost of an automobile trip. Assume that the user's car travels 20 miles per gallon of gas. Design a program
Draw the hierarchy chart and design the logic for a program for the River Falls Homes Construction Company. Design a program that prompts the user for a lot number in the River Falls subdivision and
Find more information about one of the following people and explain why he or she is important to structured programming: Edsger Dijkstra, Corrado Bohm, Giuseppe Jacopini, and Grace Hopper.
Computer programs can contain structures within structures and stacked structures, creating very large programs. Computers also can perform millions of arithmetic calculations in an hour. How can we
Develop a checklist of rules you can use to help you determine whether a flowchart or pseudocode segment is structured.
Draw a structured flowchart or write structured pseudocode describing how to do a load of laundry. Include at least two decisions and two loops.
Draw a structured flowchart or write structured pseudocode describing how to wrap a present. Include at least two decisions and two loops.
Draw a structured flowchart or write structured pseudocode describing the steps to prepare your favorite dish. Include at least two decisions and two loops.
Job applications are sometimes screened by software that makes decisions about a candidate's suitability based on keywords in the applications. Is such screening fair to applicants? Explain your
Computer programs can be used to make decisions about your insurability as well as the rates you will be charged for health and life insurance policies. For example, certain preexisting conditions
Medical facilities often have more patients waiting for organ transplants than there are available organs. Suppose you have been asked to write a computer program that selects which candidates should
Suppose you wrote a program that you suspect contains an infinite loop because it keeps running for several minutes with no output and without ending. What would you add to your program to help you
Design the logic for a program that outputs every number from 1 through 20?
If every employee in an organization had a seven-digit ID number, guessing all the possible combinations would be a relatively easy programming task. Describe how you would write a program that
a. Design an application for the Homestead Furniture Store that gets sales transaction data, including an account number, customer name, and purchase price. Output the account number and name, then
Design the logic for a program that outputs every even number from 2 through 100.
a. Design an application for Domicile Designs that gets sales transaction data, including an account number, customer name, and purchase price. The store charges 1.25 percent interest on the balance
a. Design a program for Hunterville College. The current tuition is $15,000 per year, and tuition is expected to increase by 4 percent each year. Display the tuition each year for the next 10
Design a retirement planning calculator for Skulling Financial Services. Allow a user to enter a number of working years remaining in the user's career and the annual amount of money the user can
a. Design the logic for a program that allows a user to enter 12 numbers, then displays them in the reverse order of entry.b. Modify the reverse-display program so that the user can enter any amount
Every element in an array always has the same data type. Why is this necessary?
A train schedule is an everyday, real-life example of an array. Identify at least four more.
a. Design the logic for a program that allows a user to enter 12 numbers, then displays all of the numbers, the largest number, and the smallest.b. Modify the program in Exercise 3a so that the user
You might want to use these files in any of several ways: You can look at the file contents to better understand the types of data each program uses.You can use the file contents as sample data when
Suppose that you are hired by a clinic to match a file of patient office visits with patient master records to print various reports. While working with the confidential data, you notice the name of
You might want to use these files in any of several ways: You can look at the file contents to better understand the types of data each program uses.You can use the file contents as sample data when
Now that you are becoming comfortable with arrays, you can see that programming is a complex subject. Should all literate people understand how to program? If so, how much programming should they
What are language standards? At this point in your study of programming, what do they mean to you?
Suppose that a large hospital hires you to write a program that displays lists of potential organ recipients. The hospital's doctors will consult this list if they have an organ that can be
Girl Scout Troop 815 has 25 members. Write a program in which the troop leader can enter the number of boxes of cookies sold by each scout, and output the total number of boxes sold and the mean and
The village of Marengo conducted a census and collected records that contain household data, including the number of occupants in each household. The exact number of household records has not yet
One advantage to writing a program that is subdivided into methods is that such a structure allows different programmers to write separate methods, thus dividing the work. Would you prefer to write a
In this chapter, you learned that hidden implementations are often said to exist in a black box. What are the advantages and disadvantages to this approach in both programming and real life?
Create the logic for a program that prompts a user for 10 numbers and stores them in an array. Pass the array to a method that reverses the order of the numbers. Display the reversed numbers in the
Create the logic for a program that prompts a user for six numbers and stores them in an array. Pass the array to a method that calculates the arithmetic average of the numbers and returns the value
The Information Services Department at the Springfield Library has created methods with the following signatures:a. Design an interactive program that does the following, using the prewritten methods
Some programmers use a convention called Hungarian notation when naming their variables and class fields. What is Hungarian notation, and why do many object-oriented programmers feel it is not a
In this chapter, you learned that instance data and methods belong to objects, but that static data and methods belong to a class as a whole. Consider the real-life class named
Complete the following tasks:a. Design a class named Pizza. Data fields include a string field for a topping (such as pepperoni) and numeric fields for diameter in inches (such as 12) and price (such
Many programmers think object-oriented programming is a superior approach to procedural programming. Others think it adds a level of complexity that is not needed in many scenarios. Find and
Many object-oriented programmers are opposed to using multiple inheritance.Find out why and decide whether you agree with this stance.
If you are completing all the programming exercises in this book, you can see how much work goes into planning a full-blown professional program. How would you feel if someone copied your work
Take a critical look at three GUI applications you have used—for example, a spreadsheet, a word-processing program, and a game. Describe how well each conforms to the GUI design guidelines listed
Making exciting, entertaining, professional-looking GUI applications becomes easier once you learn to include graphics images. You can copy these images from many locations on the Web. Should there
Select one element of poor GUI design in a program you have used. Describe how you would improve the design.
Have you ever encountered any confusing icons—for example, one so abstract that you could not easily determine its purpose? If so, describe your experience. If not, find a confusing icon on the Web
A component from which an event is generated is the __________ of the event.a. Sourceb. Iconc. Listenerd. Base
Playing computer games has been shown to increase the level of dopamine in the human brain. High levels of this substance are associated with addiction to drugs. Suppose that you work for a computer
Select a GUI program that you have never used before. Describe how well it conforms to the GUI design guidelines listed in this chapter.
When people use interactive programs on theWeb, do you feel it is appropriate to track which buttons they click or to record the data they enter? When is it appropriate, and when is it not? Does it
Should there be limits on Web content? Consider sites that might display pornography, child abuse, suicide, or the assassination of a political leader. Does it make a difference if the offensive
Which of the following is not a principle of good GUI design?a. The interface should be predictable.b. The fancier the screen design, the better.c. The program should be forgiving.d. The user should
Complete the following tasks:a. Develop a use case diagram for a convenience food store. Include an actor representing the store manager and use cases for orderItem(), stockItem(), and sellItem().b.
1. Develop a use case diagram for a baseball game. Include actors representing a player and an umpire. Create use cases for hitBall(), runBases(), and makeCallAtBase(). Include two generalizations
Which do you think you would enjoy more on the job—designing large systems that contain many programs, or writing the programs themselves? Why?
In earlier chapters, you considered ethical dilemmas in writing programs that select candidates for organ transplants. Are the ethical responsibilities of a system designer different from those of a
Complete the following tasks:a. Develop the UML diagram of your choice that best illustrates some aspect of a place you have worked.b. Develop a different UML diagram type that illustrates the same
Massively Multiplayer Online Role-Playing Games (MMORPG) are online computer role-playing games in which a large number of players interact with one another in a virtual world. Players assume the
The FBI's National Crime Information Center (NCIC) is a computerized database of criminal justice information, including data on criminal histories, fugitives, stolen property, and missing persons.
What type of data might be useful to a community in the wake of a natural disaster? Who should pay for the expense of gathering, storing, and maintaining this data?
Suppose you know that every employee in your organization has a seven-digit ID number used for logging on to the computer system. A loop would be useful to guess every combination of seven digits in
a. Design the logic for a program that allows a user to enter 12 numbers, then displays each number and its difference from the numeric average of the numbers entered.b. Modify the program in
Suppose that you have authority to browse your company's database. The company keeps information on each employee's past jobs, health insurance claims, and any criminal record. Also suppose that you
a. In Chapter 10, you developed a Card class that contains a string data field to hold a suit and an integer data field for a value from 1 to 13. Now extend the class to create a class called
Your downloadable files for Chapter 11 include a file named DEBUG11-04.jpg that contains a class diagram with syntax and/or logical errors. Examine the class diagram and then find and correct all the
Your downloadable files for Chapter 11 include DEBUG11-01.txt, DEBUG11-02.txt, and DEBUG11-03.txt. Each file starts with some comments that describe the problem. Comments are lines that begin with
A file named MAINTENANCE11-01.txt is included with your downloadable student files. Assume that this program is a working program in your organization and that it needs modifications as described in
Complete the following tasks:Design a method that calculates the monthly cost to rent a roadside billboard. Variables include the size of the billboard (S, M, or L, for small, medium, or large) and
Complete the following tasks:a. Design a method that calculates the cost of boarding a horse at Delmar Stables. The method accepts a code for the type of boarding, S for self-care, which provides
Complete the following tasks:a. Create a class named Order that performs order processing of a single item. The class has four fields: customer name, customer number, quantity ordered, and unit
Complete the following tasks:a. Design a class named Player that holds a player number and name for a sports team participant. Include methods to set the values for each data field and output the
Complete the following tasks:a. Design a class named Book that holds a stock number, author, title, price, and number of pages. Include methods to set and get the values for each data field. Also
Complete the following tasks:a. Create a class named Apartment that includes an apartment number, number of bedrooms, number of baths, and monthly rent. Include two overloaded constructors. The
Complete the following tasks:a. Create a class named Meal that includes a string variable for the meal’s description, an array of strings that holds up to five of the Meal’s components (for
Complete the following tasks:a. Design a class named ItemForSale that holds data about items placed for sale on Carlos’s List, a classified advertising website. Fields include an ad number, item
Complete the following tasks:a. Design a class named PhoneCall with four fields: two strings that hold the 10-digit phone numbers that originated and received the call, and two numeric fields that
Complete the following tasks:a. Design a class named Circle with fields named radius, area, and diameter. Include a constructor that sets the radius to 1. Include get methods for each field, but
The general principle of exception handling in object-oriented programming is that a method that uses data should ___________.a. Be able to detect errors, but not be required to handle themb. Be able
In object-oriented programs, errors are known as ____________.a. Faultsb. Gaffesc. Exceptionsd. Omissions
An environment in which you can develop GUI programs by dragging components to their desired positions is a(n) ___________.a. Visual development environmentb. Integrated compilerc. Text-based
A _________ is a collection of predefined, built-in classes that you can use when writing programs.a. Vaultb. Black boxc. Libraryd. Store
Which of the following is true?a. A class’s methods usually are public.b. A class’s data fields usually are public.c. Both of the aboved. None of the above
A derived class inherits ________data and methods of its ancestors.a. Allb. Only the publicc. Only the privated. No
Which of the following is true?a. A base class usually has more fields than its descendent.b. A child class can also be a parent class.c. A class’s ancestors consist of its entire list of
Which of the following is not another name for a derived class?a. Extended classb. Subclassc. Child classd. Superclass
Which of the following is another name for a derived class?a. Base classb. Child classc. Superclassd. Parent class
A class that is used as a basis for inheritance is called a _________.a. Derived classb. Subclassc. Base classd. Child class
Employing inheritance reduces errors because _________.a. The new classes have access to fewer data fieldsb. The new classes have access to fewer methodsc. You can copy and paste methods that you
Which of the following is not an advantage of creating a class that inherits from another class?a. You make it easier for anyone who has used the original class to understand the new class.b. You
Showing 1 - 100
of 459
1
2
3
4
5