Program Structure Subtasks: - Create the program structure - Create the database - Create the database object classes - Create database object factories - Build database objects - Create database population files - Populate database CUNY_EX1_2024 Source Packages vlocklear.AIRCRAFT - Aircraft.java - AircraftAvailability.java locklear.CUSTOMER - Customer.java - CustomerAccount.java - JobScheduling.java vlocklear.DBSPT - DBConnect.java vlocklear.EMPLOYEE - Employee.java - PayRecord.java locklear.ENUMS locklear.FACTORIES Iocklear.INTERFACES Libraries: - mysql-connector-j-8.3.0.jar JDK 17 (Default) Let's initially organize our program as shown.
Added by Monica G.
Close
Step 1
- Create the following packages within the src folder: vlocklear.AIRCRAFT, locklear.CUSTOMER, vlocklear.DBSPT, vlocklear.EMPLOYEE, locklear.ENUMS, locklear.FACTORIES, and locklear.INTERFACES. - Place the corresponding Java files in their respective packages. Show more…
Show all steps
Your feedback will help us improve your experience
Akash M and 71 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Using a structure and creating three structure variables, write a C++ program that will calculate the total pay for thirty (30) employees (ten for each structured variable). Sort the list of employees by the employee ID in ascending order and display their respective information. Description - DataType - Members Employee IDs - INT - employees_id Hours Worked - DOUBLE - hours_worked Pay Rate - DOUBLE - pay_rate Total Pay - DOUBLE - total_pay Array size: Administrative - structure variable - 10 Office - structure variable - 10 Field - structure variable - 10 Excluding the main function, your program should have five additional functions that will get the hours worked and pay rate, calculate the total pay, sort the data, and display your output. Base pay should be calculated by multiplying the regular hours worked by the pay rate. If a person has worked over forty (40) hours, the total pay is calculated by adding 10% of the base pay for every five (5) hours over forty (40) to the base pay. For example, a person working 50 hours with a total pay of $100 would have ((hours-40)/5)*(base pay*0.1) + base pay. But this time, create a file (datafile) that has your full name, course name, and date on the first three lines. Write the program to open the output file in append mode and write your output to this file. When the execution of your C++ program is complete, your output file should contain your name, course name, and date followed by the 10 employee records including their total pay. Name: Bob McGregor Course: Computer Science Date: 11/11/11
Akash M.
Write a program to design an appointment calendar. An appointment includes the date, starting time, ending time, and a description; for example, Dentist 2012/10/1 17:30 18:30 CS1 class 2012/10/2 08:30 10:00 Supply a user interface to add appointments, remove canceled appointments, and print out a list of appointments for a particular day. Follow the design process that was described in this chapter. Your solution should include a class Appointment- Calendar that is not coupled with the Scanner or PrintStream classes.
Population Database Make sure you have downloaded the book's source code from the companion website at www.pearson.com/gaddis. In this chapter's source code folder, you will find a program named create_cities_db.py. Run the program. The program will create a database named cities.db. The cities.db database will have a table named Cities, with the following columns: Column Name Data Type CityID INTEGER PRIMARY KEY CityName TEXT Populations REAL The CityName column stores the name of a city and the Population column stores the population of that city. After you run the create_cities_db.py program, the Cities table will contain 20 rows with various cities and their populations. Next, write a program that connects to the cities.db database, and allows the user to select any of the following operations: - Display a list of cities sorted by population, in ascending order. - Display a list of cities sorted by population, in descending order. - Display a list of cities sorted by name. - Display the total population of all the cities. - Display the average population of all the cities. - Display the city with the highest population. - Display the city with the lowest population.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD