Starting Out with Java: From Control Structures through Objects (6th Edition)
6th Edition
ISBN: 9780133957051
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 6, Problem 7SA
Assume a program named MailList.java is stored in the
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
You will design a program that manages the inventory of an electronics store. You will need to use a number of concepts that you learned in class including: use of classes, use of dictionaries and input and output of comma delimited csv files. Input: a) ManufacturerList.csv -- contains items listed by row. Each row contains item ID, manufacturer name, item type, and optionally a damaged indicator b) PriceList.csv -- contains items listed by row. Each row contains item ID and the item price. c) ServiceDatesList.csv – contains items listed by row. Each row contains item ID and service date. Example ManufacturerList.csv, PriceList.csv and ServiceDatesList.csv are provided for reference. Your code will be expected to work with any group input files of the appropriate format. Manufacturers can and will likely be different as will the items. Required Output: 1) Processed Inventory Reports: a. FullInventory.csv -- all the items listed by row with all their information . The items should be…
You will design a program that manages the inventory of an electronics store. You will need to use a number of concepts that you learned in class including: use of classes, use of dictionaries and input and output of comma delimeted csv files.
Input:a) ManufacturerList.csv -- contains items listed by row. Each row contains item ID,manufacturer name, item type, and optionally a damaged indicatorb) PriceList.csv -- contains items listed by row. Each row contains item ID and the item price.c) ServiceDatesList.csv – contains items listed by row. Each row contains item ID and servicedate.
Required Output:1) Interactive Inventory Query Capabilitya. Query the user of an item by asking for manufacturer and item type with a single query.
i. Print a message(“No such item in inventory”) if either the manufacturer or theitem type are not in the inventory, more that one of either type is submitted orthe combination is not in the inventory. Ignore any other words, so “nice Applecomputer” is treated…
You will design a program that manages the inventory of an electronics store. You will need to use a number of concepts that you learned in class including: use of classes, use of dictionaries and input and output of comma delimeted csv files.
Input:a) ManufacturerList.csv -- contains items listed by row. Each row contains item ID,manufacturer name, item type, and optionally a damaged indicatorb) PriceList.csv -- contains items listed by row. Each row contains item ID and the item price.c) ServiceDatesList.csv – contains items listed by row. Each row contains item ID and servicedate.
Required Output:1) Interactive Inventory Query Capabilitya. Query the user of an item by asking for manufacturer and item type with a single query.
i. Print a message(“No such item in inventory”) if either the manufacturer or theitem type are not in the inventory, more that one of either type is submitted orthe combination is not in the inventory. Ignore any other words, so “nice Applecomputer” is treated…
Chapter 6 Solutions
Starting Out with Java: From Control Structures through Objects (6th Edition)
Ch. 6.1 - What does an object use its fields for?Ch. 6.1 - Prob. 6.2CPCh. 6.1 - How is a class like a blueprint?Ch. 6.1 - You have programs that create Scanner, Random, and...Ch. 6.1 - Prob. 6.5CPCh. 6.1 - What values do reference variables hold?Ch. 6.1 - Prob. 6.7CPCh. 6.2 - You hear someone make the following comment: A...Ch. 6.2 - Prob. 6.9CPCh. 6.2 - When a variable is said to reference an object,...
Ch. 6.2 - Prob. 6.11CPCh. 6.2 - Prob. 6.12CPCh. 6.2 - Prob. 6.13CPCh. 6.2 - Prob. 6.14CPCh. 6.2 - Prob. 6.15CPCh. 6.2 - What is a stale data item?Ch. 6.3 - Assume that r1 and r2 are variables that reference...Ch. 6.4 - How is a constructor named?Ch. 6.4 - What is a constructors return type?Ch. 6.4 - Prob. 6.20CPCh. 6.7 - Prob. 6.21CPCh. 6.7 - What is a methods signature?Ch. 6.7 - Look at the following class: public class...Ch. 6.7 - How many default constructors may a class have?Ch. 6.9 - Prob. 6.25CPCh. 6.9 - When designing an object-oriented application, who...Ch. 6.9 - How do you identify the potential classes in a...Ch. 6.9 - What are a classs responsibilities?Ch. 6.9 - What two questions should you ask to determine a...Ch. 6.9 - Will all of a classs actions always be directly...Ch. 6 - This is a collection of programming statements...Ch. 6 - A class is analogous to a(n) _______. a. house b....Ch. 6 - An object is a(n) ________. a. blueprint b....Ch. 6 - This is a class member that holds data. a. method...Ch. 6 - This key word causes an object to be created in...Ch. 6 - This is a method that gets a value from a classs...Ch. 6 - This is a method that stores a value in a field or...Ch. 6 - When the value of an item is dependent on other...Ch. 6 - This is a method that is automatically called when...Ch. 6 - When a local variable has the same name as a...Ch. 6 - This is automatically provided for a class if you...Ch. 6 - Prob. 12MCCh. 6 - Prob. 13MCCh. 6 - A classs responsibilities are __________. a. the...Ch. 6 - True or False: The new operator creates an...Ch. 6 - True or False: Each instance of a class has its...Ch. 6 - True or False: When you write a constructor for a...Ch. 6 - True or False: A class may not have more than one...Ch. 6 - True or False: To find the classes needed for an...Ch. 6 - Find the error in the following class: public...Ch. 6 - Prob. 2FTECh. 6 - The following statement attempts to create a...Ch. 6 - Find the error in the following class: public...Ch. 6 - Find the error in the following class: public...Ch. 6 - Design a class named Pet, which should have the...Ch. 6 - Look at the following partial class definition,...Ch. 6 - Consider the following class declaration: public...Ch. 6 - Look at the following description of a problem...Ch. 6 - What is the difference between a class and an...Ch. 6 - A contractor uses a blueprint to build a set of...Ch. 6 - What is an accessor method? What is a mutator...Ch. 6 - is it a good idea to make fields private? Why or...Ch. 6 - If a class has a private field, what has access to...Ch. 6 - Prob. 6SACh. 6 - Assume a program named MailList.java is stored in...Ch. 6 - Why are constructors useful for performing...Ch. 6 - Under what circumstances does Java automatically...Ch. 6 - What do you call a constructor that accepts no...Ch. 6 - Prob. 11SACh. 6 - How does method overloading improve the usefulness...Ch. 6 - Employee Class Write a class named Employee that...Ch. 6 - Car Class Write a class named Car that has the...Ch. 6 - Personal Information Class Design a class that...Ch. 6 - Retail Item Class Write a class named RetailItem...Ch. 6 - Payroll Class Design a Payroll class that has...Ch. 6 - TestScores Class Design a TestScores class that...Ch. 6 - 7. Circle Class
Write a circle class that has the...Ch. 6 - Prob. 8PCCh. 6 - Days in a Month Write a class named MonthDays, The...Ch. 6 - A Game of Twenty-One For this assignment, you will...Ch. 6 - Freezing and Boiling Points The following table...Ch. 6 - SavingsAccount Class Design a SavingsAccount class...Ch. 6 - Deposit and Withdrawal Files Use Notepad or...Ch. 6 - Dice Game Write a program that uses the Die class...Ch. 6 - Roulette Wheel Colors On a roulette wheel, the...Ch. 6 - Coin Toss Simulator Write a class named Coin. The...Ch. 6 - Tossing Coins for a Dollar For this assignment you...Ch. 6 - Fishing Game Simulation For this assignment, you...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Can a derived class ever directly access the private members of its base class?
Starting Out with C++ from Control Structures to Objects (8th Edition)
Thetakes the .class files containing the programs bytecodes and transfers them to primary memory.
Java How To Program (Early Objects)
How is a Java character represented in the memory, and how is a character represented in a text file?
Introduction to Java Programming and Data Structures, Comprehensive Version (11th Edition)
How many "hello lines does this program print?
Computer Systems: A Programmer's Perspective (3rd Edition)
Which file open flag causes all output to take place at the end of the file?
Starting Out with C++: Early Objects
Suppose your program contains the following type definitions: struct Box { string name; int number; Box next; }...
Problem Solving with C++ (10th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Part I Create an interface for a Store application. Provide at least 3 function. Part II Create a type of Store class. Implement the methods introduced in the interface. Note: Do not compress your files, submit only java files. Note: Do not forget to justify your answers with comments.arrow_forwardWrite another Java class named Patient that contains: ■ A private integer data field called id. ■ A private static integer data field called numberOfPatients that counts the number of Patient objects created (default value 0). ■ A private String data field called name. ■ A private Address variable called address. ■ A private File variable called file that refers to a database.txt file. ■ A constructor that creates a patient object with specified name and address. Note that the id of patients is auto-incremented. If 3 patients are created the first one would have id 1, the second id would be 2 and the third id 3. ■ A static method getNumberOfPatients() that returns the number of patients. ■ A method getId() that returns the patient’s id. ■ A toString() method that returns a one-line description of the patient. ■ A savePatientToFile() method that is called every time a new patient object is created to save the patient information (patient object) to the database file.arrow_forwardAsk the user for three employees. Store the data into three employee object. Display those employees in a table. on this program make 2 files, one is Employees.java and the one has a Main. write in java and use test case 1 as an example.arrow_forward
- please use java to answer the following question Implement a program with a GUI and Action listener that looks like the one shown below You should connect to the database ( make sure you have maximum 5 rows in your table) The table should contain of the name, card number and the pin number of the customers who uses the ATM once you enter the card number and the pin number that exist in the database, then by clicking on the Login button, you could show a dialogue dialog box in which it shows the name of the customer and then indicates that that name is login successfully ( Mehrnaz is login successfully). Otherwise, the dialogue box indicates that the information does not exist in the database. The clear button will clear all the information on the GUI.arrow_forwardIn Java, create a program that asks the user for their first name, last name, address, city, zip, phone number, email, hourly rate, start date, end date, and number of hours worked. The program must consist of three classes, each one in its own file (I.e. Employee.java, PayPeriod.java) and called back to a main.java file. Classes named Employee, PayPeriod, and Payroll Manager. Employee gathers the info about the employee. PayPeriod gathers the payment info. PayrollManager computes and displays the info. PayrollManager should also use methods such as: double CalculateGrossPay(Employee, PayPeriod), double CalculateRegularPay(Employee, PayPeriod), double CalculateOvertimePay(Employee, PayPeriod), and void PrintPaystub(Employee, PayPeriod). output: ------------------------------------------Employee ID: 123456 Last Name: last First Name: first Hours Worked: 50 Hourly Rate: $10.00 Regular Pay: 40 hours at $10/hr: $400.00 Overtime Pay: 10 hours at $15/hr: $150.00 Gross…arrow_forwardCreate a C# program named ConferencesDemo for a hotel that hosts business conferences. Allows a user to enter data about five Conference objects and then displays them in order of attendance from smallest to largest. The Conference class contains fields for the following: group - The group name (as a string) date - The starting date (as a string) attendees - The number of attendees (as an int) Include properties for each field. Also, include an IComparable.CompareTo() method so that Conference objects can be sorted in order from least to greatest attendees. Your output for each conference should match the following: NAME Conference starts on DATE and has ATTENDEES attendees using System; using static System.Console; class ConferencesDemo { static void Main() { // Write your main here } }arrow_forward
- Design a program using a console application in java, named studentMarksReport that will print the final result obtained by a student with the weighting of each module. Make use of a class named Student that contains variables to store the student number, test result, assignment result and exam. Create a constructor that accepts the student number, test result, assignment result and the exam result as parameters and create get methods for the variables (Use Scanner to get variable from the user). Create a subclass called Student_Report that extends the Student class. The Student_Report overrides all getter methods and the constructor from Students. Write code for the print_report method which calculates each assessment weighting as follows: Assessment Weighting Test 25% Assignment 25% Exam 50%arrow_forwardA library wants to manage its collection of books and authors more efficiently. They would like to create a Python program to help with this task. The following requirements need to be implemented: Create an Author class with the attributes: name, dob (date of birth), and nationality. The class should have a __str__ method to represent the author in a user-friendly format. Create a Book class with the following attributes: title, author (an instance of the Author class), publication_date, and price. Also, include a class variable all_books that keeps a list of all book instances created.The Book class should have: A __str__ method to represent the book in a user-friendly format. A __eq__ method to compare two books. Two books are considered the same if they have the same title and author. A __lt__ method to compare two books based on their publication dates. A class method get_all_books that returns a list of all books in the library. A static method most_expensive_book that takes…arrow_forwardProblem Description and Given Info For this assignment you are given the following Java source code files: IStack.java (This file is complete – make no changes to this file) MyStack.java (You must complete this file) Main.java (You may use this file to write code to test your MyStack) You must complete the public class named MyStack.java with fields and methods as defined below. Your MyStack.java will implement the IStack interface that is provided in the IStack.java file. You must implement your MyStack class as either a linked list or an array list (refer to your MyArrayList and MyLinkedList work). Your MyStack must not be arbitrarily limited to any fixed size at run-time. UML UML CLass Diagram: MyStack Structure of the Fields While there are no required fields for your MyStack class, you will need to decide what fields to implement. This decision will be largely based on your choice to implement this MyStack as either an array list or a linked list. Structure of the Methods As…arrow_forward
- Create a python using a Class called Employee 2. Use the init function to collect the employee information (Name, email, and mobile number) 3. Instantiate the Employee class two times with different information 4. Display all the properties of the object.arrow_forwardWhich of the following is designed to break information hiding principles (by letting the programmer control access control) in encapsulation constructs? friends modules packages assembliesarrow_forwardIn Java, create a program that asks the user for their first name, last name, address, city, zip, phone number, email, hourly rate, start date, end date, and number of hours worked. The program must consist of three classes, each one as its own .java file. Classes named Employee, PayPeriod, and Payroll Manager. Employee gathers the info about the employee. PayPeriod gathers the payment info. PayrollManager computes and displays the info. PayrollManager should also use methods such as: double CalculateGrossPay(Employee, PayPeriod), double CalculateRegularPay(Employee, PayPeriod), double CalculateOvertimePay(Employee, PayPeriod), and void PrintPaystub(Employee, PayPeriod). output: ------------------------------------------Employee ID: 123456 Last Name: last First Name: first Hours Worked: 50 Hourly Rate: $10.00 Regular Pay: 40 hours at $10/hr: $400.00 Overtime Pay: 10 hours at $15/hr: $150.00 Gross Total: $550.00 ------------------------------------------arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Memory Management Tutorial in Java | Java Stack vs Heap | Java Training | Edureka; Author: edureka!;https://www.youtube.com/watch?v=fM8yj93X80s;License: Standard YouTube License, CC-BY