
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
![Problem 2: Organizing Apps
A smart phone model allows users to organize their apps in sets related to the apps
purposes.
Here is a data definition to represent an app set in DrRacket:
4: An AppSet is one of:
*: -- Folder
*: -- Apps
;; A Folder is a (make-folder String)
(define-struct folder [title])
A
+ Apps is a (make-apps String AppSet)
(define-struct apps [app-name others])
• Draw the class diagram that represents this data definition. You may draw this as
ASCII-art and include it in your submission, if you wish. Or you can just draw it on
paper and not submit it. Regardless, we think it will help you in visualizing how the
data is organized.
Convert this data definition into Java. Make sure you use the same names for data
types and for the fields, as are used in the DrRacket data definitions, converted into Java
style conventions. Make sure that the constructor arguments are given in the same order
as shown.
Include in your examples the following sets:
- a "Travel" set with "Uber" and "mTicket and Moovit" and "Orbitz"
- a "Food" set with "Grubhub" and "B. Good" and "Gong Cha"
Make sure the two sample sets given above are named travelApps and foodApps.
Note: the descriptions above are listed in the order that you would add the apps to a
folder in real life. Think carefully how this should be represented as data.
Name the class that holds the examples of your group data ExamplesSets.
What to submit
You should submit your data definitions and examples in a file named AppSets.java
Remember to check the feedback in handins for Style and Checker Tests in handins!](https://content.bartleby.com/qna-images/question/ffbf47e9-5bb9-4b19-a28b-799790ab70ec/038d2d23-3d58-491b-ac15-757d307efab5/qinbfp_thumbnail.jpeg)
Transcribed Image Text:Problem 2: Organizing Apps
A smart phone model allows users to organize their apps in sets related to the apps
purposes.
Here is a data definition to represent an app set in DrRacket:
4: An AppSet is one of:
*: -- Folder
*: -- Apps
;; A Folder is a (make-folder String)
(define-struct folder [title])
A
+ Apps is a (make-apps String AppSet)
(define-struct apps [app-name others])
• Draw the class diagram that represents this data definition. You may draw this as
ASCII-art and include it in your submission, if you wish. Or you can just draw it on
paper and not submit it. Regardless, we think it will help you in visualizing how the
data is organized.
Convert this data definition into Java. Make sure you use the same names for data
types and for the fields, as are used in the DrRacket data definitions, converted into Java
style conventions. Make sure that the constructor arguments are given in the same order
as shown.
Include in your examples the following sets:
- a "Travel" set with "Uber" and "mTicket and Moovit" and "Orbitz"
- a "Food" set with "Grubhub" and "B. Good" and "Gong Cha"
Make sure the two sample sets given above are named travelApps and foodApps.
Note: the descriptions above are listed in the order that you would add the apps to a
folder in real life. Think carefully how this should be represented as data.
Name the class that holds the examples of your group data ExamplesSets.
What to submit
You should submit your data definitions and examples in a file named AppSets.java
Remember to check the feedback in handins for Style and Checker Tests in handins!
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 2 images

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
- 8) The following form does not always work. Why not?<form action = "form.php" method = "get">Pick a cat: <input type = "file" name = "cat" /><input type = "submit" /></form>A) File is not valid input type. B) The form element’s method attribute is wrong. C) Validation code is missing. D) URL is invalid.arrow_forwardIn c++ Please help. Please do not use Chat GPTarrow_forwardC PROGRAMMING HELP I need help fixing an old assignment of mine. The point of the script is to read the pasted/attached Number_new.txt file's contents, meant to represent a classes' final grades out of 100 percent, and print an .exe screen as well as another .txt file that repeats the grade number with a letter grade and a PASS or FAIL next to it. At the end it needs to say how many students passed and how many failed. Nothing too complicated with the grading, just 90.0 and up is an A, 80.0 to 89.99 is a B, etc. And of course, anything below 60.0 is an F/FAIL. Please NO IOSTREAM.H OR CACIO.H! I cant use those header files. Below is the script: #include<stdio.h>#include<math.h>#define THEFILE "Number_new.txt" int main(){ float r0[10]; float rr[10]; FILE *fp; char line[81]; fp = fopen(THEFILE, "Number_new.txt"); if (fp != NULL) { /* The file is open. */ printf("%7s %7s %7s %7s %7s %7s %7s %7s %7s %7s\n", "0", "0.01",…arrow_forward
- Fleet class: Instance Variables An array that stores Aircraft that represents Delta Airlines entire fleet A variable that represents the count for the number of aircraft in the fleet Methods: o Constructor-One constructor that instantiates the array and sets the count to aero readFile()-This method accepts a string that represents the name of the file to be read. It will then read the file. Once the data is read, it should create an aircraft and then pass the vehicle to the addAircraft method. It should not allow any duplication of records. Be sure to handle all exceptions. o writeFile()-This method accepts a string that represents the name of the file to be written to and then writes the contents of the array to a file. This method should call a sort method to sort the amay before writing to it. sortArray()-This method returns a sorted array. The array is sorted by registration number.u addAircraft- This method accepts an aircraft and adds it to the fleet(the array only if it is not…arrow_forward11:02 all 10% + Create 1 1000.01 Create 2 2000.02 Create 3 3000.03 Deposit 111.11 Deposit 2 22.22 Withdraw 4 5000.00 Create 4 4000.04 Withdraw 1 0.10 Balance 2 Withdraw 2 0.20 Deposit 3 33.33 Withdraw 4 0.40 Bad Command 65 Balance 1 Balance 2 Balance 3 Balance 4arrow_forwardData structure & Algrothium java program Create the three following classes: 1. class containing two strings attributes first name and last name.2. class containing the name object and an ArrayList of string to store the list gifts. This class would extend the attached NicePersonInterface.java3. class containing one ArrayList of Names to store the naughty names. Another ArrayList of NicePerson to store the nice names and gifts. Add atleast 4 names in each list and display all information.arrow_forward
- Create an array of objects of the Person class, of size 4. Create three objects of the Person class, with values, and assign the objects to the array. Loop through the array and print the name, job, and email of all Personobjects.arrow_forward16 Type the correct answer in the box. Use numerals instead of words. If necessary, use / for the fraction bar. var num2 = 32; var num1 = 12; var rem=num2 % num1; while(rem> 0) { num2 = num1; num1 = rem; rem =num2 9% num1; document.write(num1): The output of the document.write statement at the end of this block is Reset Next m. All rights reserved. 5896arrow_forwardN-SIDED REGULAR POLYGON) In an n-sided regular polygon, all sides have the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular). Design a class named RegularPolygon that contains: ▪ A private int data field named n that defines the number of sides in the polygon with default value 3. ▪ A private double data field named side that stores the length of the side with default value 1. A private double data field named x that defines the x-coordinate of the polygon's center with default value 0. ▪ A private double data field named y that defines the y-coordinate of the polygon's center with default value 0. A no-arg constructor that creates a regular polygon with default values. A constructor that creates a regular polygon with the specified number of sides and length of side, centered at (0, 0). A constructor that creates a regular polygon with the specified number of sides, length of side, and x- and y-coordinates. ▪ The accessor and…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education