Preview

programming Solution

Satisfactory Essays
Open Document
Open Document
430 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
programming Solution
Chapter 13 Answers to Exercises

1. Identify three objects that might belong to each of the following classes:
a. Automobile
b. NovelAuthor
c. CollegeCourse

The students will have a variety of answers for these questions. Some examples might be:
a. myRedChevroletCamaro, theBlackfordMustangWithTheDentThatBobDrives, thePorschee911ThatDonaldTrumpOwns
b. Terry Brooks, Steven King, Ray Bradbury
c. English Composition, Calculus, Physics

2. Identify three different classes that might contain each of these objects:
a. Wolfgang Amadeus Mozart
b. My pet cat named Socks
c. Apartment 14 at 101 Main Street

The answers to this question will also vary. Some examples are:
a. musicians, composers, baroque music performer
b. animals, domestic pets, felines
d. building, housing, locations

3. Design a class named CustomerRecord that holds a customer number, name, and address. Include methods to set the values for each data field and print the values for each data field. Create the class diagram and write the pseudocode that defines the class.

class CustomerRecord private num CustomerNumber private char Name private char Address

public setCustomerNumber (num Number) CustomerNumber = Number return public setName (char newName) Name=newName return public setAddress (char newAddress) Address=newAddress return 4. Design a class named House that holds the street address, price, number of bedrooms, and number of baths in a House. Include methods to set the values for each data field. In the set methods, do not allow the price, bedrooms, or baths to be negative. Include a method that displays all the values for a House. Create the class diagram and write the pseudocode that defines the class.

class House private char Address private num Price private num Bedrooms private num Baths

public SetAddress(char newAddress) Address=newAddress return public SetPrice(num newPrice) if newPrice>0 then

You May Also Find These Documents Helpful

  • Satisfactory Essays

    A retail store gives each of its customers a maximum amount of credit. A customer’s available credit is determined by subtracting the amount of credit used by the customer from the customer’s maximum amount of credit. As you did in programming challenge 1, perform steps 1 through 6 of the programming process to design an application that determines a customer’s available credit.…

    • 636 Words
    • 3 Pages
    Satisfactory Essays
  • Powerful Essays

    b) 10 Convert the one table in the previous question to a relational database design. Fill each table in your…

    • 1445 Words
    • 6 Pages
    Powerful Essays
  • Powerful Essays

    Chapter 20 Notes

    • 1889 Words
    • 8 Pages

    Write a response to each of the following questions and / statements. Your responses must be written in complete sentences and should demonstrate an understanding of the course content.…

    • 1889 Words
    • 8 Pages
    Powerful Essays
  • Good Essays

    “New York Freelance Technology is a web based organization affiliated with Montana Freelance Technology and GMR Web Services that continues to give you quality hosting at an affordable cost.” (New York Freelance Technology, 2011) Not only does NY Freetech perform web specific tasks, they also handle numerous person to person tasks such as custom computer building, videography and DVD authoring. Their web related tasks include web design, web development, graphics design, web hosting and DNS (domain name system). One thing NY Freetech does not have is a support forum for their customers. To contact customer service, currently you have to email them and wait for a reply. What is needed is a support forum. Customers or prospect customers can post in the forums and ask questions and the administrators can answer the questions. If other customers or users know the answer to the question, they can also answer. That will help the customers questions get answered faster. Upon reviewing the company website, I noticed there was no support forum. There is a small FAQ (frequently asked questions) but no forum. The personnel involved in the project have a certain role they must play, the steps of the program development cycle must be followed and the project should be performed in a modular fashion. For every task performed in any organization, personnel involved have roles they must play.…

    • 930 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Ib 270 Research Paper

    • 723 Words
    • 3 Pages

    Description: Responses to a combination of multiple choice questions and short answer questions covering all the content material in both the lectures and practicals.…

    • 723 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    In 75 words each, the student responded to the following questions with appropriate thought and details:…

    • 1185 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    The following are examples of texts that may be studied for student responses to question 2.…

    • 345 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    For each learning (and you need to address three or four), address the following questions in a…

    • 735 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    CTS 2437 Final Exam

    • 630 Words
    • 4 Pages

    4. Create a table called Customers that contains a person’s first name, last name, and social security number. Your table definition should…

    • 630 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Study Guide

    • 1022 Words
    • 3 Pages

    Answer at least 2 of these questions comprehensively and complete a reply response to at least two students.…

    • 1022 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    schools as organisations

    • 436 Words
    • 2 Pages

    b) Explain how the way the school is managed reflects the points included in the brief notes prepared for each category?…

    • 436 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    starting with the basics

    • 1055 Words
    • 5 Pages

    To answer questions 1–18, log on to your student website, and explore the resources available.…

    • 1055 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Mid Term Pre Sheet

    • 356 Words
    • 2 Pages

    These questions, as on our quizzes, will be on factual information taken from your reading and from the lectures. You should thus use your lecture outlines to help you boil down the material in the texts. Rely especially on the text to fill out your knowledge of points mentioned on your lecture outlines. Below you will find some examples of multiple choice questions:…

    • 356 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Prepare answers to the following questions prior to class. In class you will be given time to discuss your findings in small groups. Be prepared to present your findings either individually, or as a group, to the class.…

    • 846 Words
    • 4 Pages
    Good Essays
  • Powerful Essays

    Atlanta Home Loan

    • 1755 Words
    • 9 Pages

    These are among the questions that the instructor can use to stimulate the in-class discussion:…

    • 1755 Words
    • 9 Pages
    Powerful Essays

Related Topics