Assignment Chef icon Assignment Chef

Browse assignments

Assignment catalog

33,401 assignments available

[SOLVED] Cecs‐545 project 1: travelling salesperson problem ‐ brute force

At the completion of this project, you should be able to: o Implement a method to generate all permutations of a set of numbers. o Trace a Hamiltonian path through an undirected graph. o Use brute force to find the minimum cost solution to a Traveling Salesperson Problem.o A Traveling Salesperson Problem (TSP) is an NP-complete problem. A salesman is given a list of cities and a cost to travel between each pair of cities (or a list of city locations). The salesman must select a starting city and visit each city exactly one time and return to the starting city. His problem is to find the route (also known as a Hamiltonian Cycle) that will have the lowest cost. (See http://www.tsp.gatech.edu for more info)• Problem o You will be expected to use brute force to calculate the minimum cost paths for a series of problems. o Data for each problem will be supplied in a .tsp file (a plain text file). • Hints o Be careful of exponential explosion. 10 cities will have over 3 million possible paths. o The largest data set will be 12 cities. o I strongly urge you to create reusable code. It will be needed for the future projects.o In the future projects, we will be dealing with MUCH larger datasets. So large that brute force approach would not be possible.• Deliverables o Project report (2-3 pages). Describe how you generated the permutations representing the tours. Show the route and the cost of the optimal tour for each provided dataset.o Well-commented source code for your project (You can use any language you like, but I reserve the right to ask you to demo performance of your algorithm on a new dataset).o You don’t have to include a GUI with visual representation of the solutions for this project, but it might be useful for your future TSP related projects in this course.Data Format: You can read about standard TSP problem files here: http://www.iwr.uni-heidelberg.de/groups/comopt/software/TSPLIB95 Data files for development and testing of your code will be generated using Concorde: http://www.tsp.gatech.edu/concorde/index.html Sample data file with 7 cities: NAME: concorde7 TYPE: TSP COMMENT: Generated by CCutil_writetsplib COMMENT: Write called for by Concorde GUI DIMENSION: 7 EDGE_WEIGHT_TYPE: EUC_2D NODE_COORD_SECTION 1 87.951292 2.658162 2 33.466597 66.682943 3 91.778314 53.807184 4 20.526749 47.633290 5 9.006012 81.185339 6 20.032350 2.761925 7 77.181310 31.922361 Distance Formula:

$25.00 View

[SOLVED] Cecs-545 final project: genetic algorithm with wisdom of artificial crowds for np complete problems

At the completion of this project, you should be able to: o Implement a hybrid GA+WoC algorithm for solving an NP complete problem o Be able to evaluate a novel algorithm for solving an NP-Complete problem. Problem o By now you have a great deal of experience in solving TSP problem using different methodologies. TSP was chosen as a classical NP-complete problem, but the skills you have learned are equally valuable for other NP-complete problems. This project is designed to give you a greater degree of scientific independence. For this project YOU will have to decide on a specific NP-complete problem to attempt to solve.o You will also need to be able to generate test data for your experiments based on the problem you select o A large list of potential problems is available at: http://en.wikipedia.org/wiki/List_of_NP-complete_problemsFeel free to consult with your instructor regarding your options … but do not choose: Light Up, Sudoku, Knapsack, Mastermind, Battleship, Kakuro, Crossword Puzzle, Graph Coloring or TSP Hints o This is our last project; it is the largest and most time demanding. Allocate sufficient time to do an excellent job on it. There will be no extensions given since we are approaching the end of the semester and other deliverables will be based on Proj. 6. o Due in two weeks.o Your presentation and research paper (to be assigned later) will also be based on the results of your experiments from this project so a large percentage of your grade will be based on this project directly or indirectly.o Look at project 5 assignment for specific requirements/experiments to include in your report. Make sure you conduct enough different experiments to generate results sufficient for a research paper about solving your chosen NP-complete problem using the WoC approach. Deliverables o Well-commented source code for your project. You can use any language you like, but I reserve the right to ask you to demo performance of your algorithm on a new dataset.o Include a GUI with visual representation of the solutions for this project and incorporate snapshots in your report.o Project report (9-10 pages). o Make sure to describe the problem you are addressing in great detail. o Make sure you explain how test data was generated (format, etc.) o Research paper (details will be announced). Presentation (details will be announced)

$25.00 View

[SOLVED] Cse 525 project 1 assembly and c in microcomputer design

Part 1: Using a Raspberry PI lab computer, explore GCC, GAS, GDB, SSH, and the ARM programming model. When exploring SSH, you can optionally install, if necessary, SmarTTY onto your laptop to be able to SSH to a Raspberry PI computer in the lab (need to be on Belknap campus WIFI).Note: The latest Windows 10 won‟t need a third-party app such as SmarTTY in order to SSH, simply bring up a commandline window (run „CMD‟) and use the SSH command at the command line. Apple OSX and Linux computers also have the SSH command built-in, simply launch a Terminal window and use.After connected to a RPI computer, you will find that GCC, GAS, and GDB are already installed (native) by default in the Raspbian OS. See these excellent references: http://www.microdigitaled.com/ARM/ASM_ARM/Software/ARM_Assembly_Programming_Usin g_Raspberry_Pi_GUI.pdf https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.pdf https://www.gnu.org/software/gdb/documentation/ https://sourceware.org/binutils/docs/as/And of course, programming on the Raspberry PI computer can be accomplished directly using its own keyboard and mouse instead of remotely via WIFI and SSH.Lab Tip: One helpful way of learning a processor’s architecture and operational behavior is by first learning its programming model including its Assembly instruction set and addressing modes and how these things are implemented according to the manufacturer’s specifications or guidelines. A good starting point is the C compiler because a C compiler written for a particular processor is designed based on the manufacturers specifications or guidelines.Therefore, when a C program is written and compiled and the Assembly listing is examined, the manufacturer’s specifications or guidelines are revealed. Note: You can also find or determine the specifications/guidelines in the manufacturer’s technical data sheets.Understanding how the compiler generates the correct Assembly code will help you to do the same. If you “think” like the C compiler when you are writing Assembly source code then you will be following the manufacturer’s specifications or guidelines and your Assembly code will be 100% compatible however you are using it. So, learn to think like the C compiler by always examining the Assembly it generates. Sooner or later, you won’t need to examine the Assembly unless for a quick reference or debugging logical errors. And as a C and Assembly systems programmer, you will benefit greatly by making this lab tip a habit.Refer to the ARM Info Center for information about ARM Assembly Instructions, and Addressing Modes, and Calling Conventions, basically everything about the ARM technology can be found there.Note: We are using the ARM Cortex A53 64-bit processor but the current Raspbian is a 32-bit OS that comes with the ARMv6 GCC toolchain for 32-bit builds. The A53 processor is designed to be backwards compatible with 32-bit software but with some decrease in performance. No 64-bit ARMv8 Raspbian exists at the time of this writing. However, there is a 64-bit SUSE Linux OS that runs on the Raspberry PI and supports ARMv8 64-bit builds.Enter the following code in your favorite editor and save as P1-1.c, I will use nano. The Raspbian Text Editor and Leafpad are good built-in editors too. You may also choose to install and use the Code::Blocks editor on the Raspberry PI by entering ‘sudo apt-get install codeblocks’. Compile by entering ‘gcc P1-1.c’//Eugene Rockey, Copyright 2018, All rights reserved. //Project 1 Part 1 //Compile on Raspberry PI using the command ‘gcc P1-1.c’ to make sure there are no errors. //Compile on Raspberry PI using the command ‘gcc -S P1-1.c’ to generate Assembly listing. //Open the generated Assembly file named P1-1.s and fulfill part 1 requirements. //Global Data Types signed char var1 = 1; unsigned char var2 = 2; signed int var3 = 3; unsigned int var4 = 4; const int num = -10; char wave[10]=”goodbye!!!”; void main() { //Local Data Type int var5 = 5; //Various Loop Types for (var5;var5>0;var5–) { var1*=var1; var1/=var1; var1+=var1; var1-=var1; } do { var4-=1; }while(var4>0); while(var3 == 3) { var2 = var2; break; } }After compiling on the Raspberry PI, generate an Assembly file listing (P1-1.s) by entering ‘gcc -S P1-1.c’. In your report, discuss every unique Assembler directive in that listing, discuss every equivalent assembly section corresponding to each line of C code, comment all the Assembly lines of code describing the operation and addressing modes of each instruction.Part 2: Use a Raspberry PI lab computer to continue to explore the ARM programming model. Enter and compile the following code with the name P!-2.c. After compiling on the Raspberry PI, generate an Assembly file listing (P1-1.s). In your report, discuss every new and unique Assembler directive in that listing, discuss every equivalent assembly section corresponding to each line of C code, comment all the Assembly lines of code describing the operation and addressing modes of each new and unique instruction.//Eugene Rockey, Copyright 2018, All rights reserved. //Project 1 Part 2 //Compile on Raspberry PI using the command ‘gcc P1-2.c’ to make sure there are no errors. //Compile on Raspberry PI using the command ‘gcc -S P1-2.c’ to generate Assembly listing. //Open the generated Assembly file P1-2.s and fulfill part 2 requirements. //volatile modifier for variables that chage due to hardware interrupts, RTC, etc… volatile int var; //Function with Pointers void swap(int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } //A stack frame (fp) is used here for the subroutine(function) call. //Also, the stack is used when switching between OS and main() too. int main() { //local variables int a, b; a = 10; b = 20; swap(&a, &b); return 0; }Part 3: A) Use a Raspberry PI computer to explore the ARM Calling Conventions(an industry standard). Calling Conventions are about how the C compiler utilizes the processor’s registers and memory(stack) to pass input and output parameters between main() and subroutines or functions and between subroutines or functions. The processor’s manufacturer specifies guidelines on how this should be done so that all other manufacturer’s who implement said processor are on the same page making all their products compatible with each other.Note: If you do not want your product to be compatible then do not follow the industry standard Calling Conventions, use the registers and memory in some other way. However, this means you will also have to write your own custom C compiler in accordance with your custom register and memory usage or just program in 100% Assembly. We use Rasbian, which implements the industry standard ARM Calling Conventions; therefore, we must also take into account the ARM Calling Conventions in this Lab.Enter and compile the following code with the name P1-3A.c. After compiling on the Raspberry PI, generate an Assembly file listing (P1-3A.s). In your report, discuss every new and unique Assembler directive in that listing, discuss every equivalent assembly section corresponding to each line of C code, comment all the Assembly lines of code describing the operation and addressing modes of each new and unique instruction. Comment and discuss the ARM Calling Conventions detected in the Assembly listing, specifying register and or memory(stack) used to pass parameters between main() and the subroutine or function.//Eugene Rockey, Copyright 2018, All rights reserved. //Project 1 Part 3A //Compile on Raspberry PI using the command ‘gcc P1-3A.c’ to make sure no errors exist. //Run and test the program by entering ‘./a.out’ //Generate the Assembly listing by entering ‘gcc -S P1-3A.c’ //Open the generated Assembly file ‘P1-3A.s’ and fulfill part 3A requirements. #include unsigned char next_char(char in) { return in + 1; } void main() { printf(“Next Character= %c ”,next_char(‘A’)); }B) Enter and compile the following source files with the names P1-3B.c and P1-3BASM.s. After compiling on the Raspberry PI, generate an Assembly file listing (P1-3B.s). In your report, discuss every new and unique Assembler directive in that listing, discuss every equivalent assembly section corresponding to each line of C code, comment all the Assembly lines of code describing the operation and addressing modes of each new and unique instruction. Comment and discuss the ARM Calling Conventions detected in the Assembly listing, specifying register and or memory(stack) used to pass parameters between main() and the subroutine or function.Put the following C source code into its own P1-3B.c source file… //Eugene Rockey, Copyright 2018, All rights reserved. //Project 1 Part 3B //Compile the program by entering ‘gcc P1-3B.c P1-3BASM.s’ and check for errors. //Run the program by entering ‘./a.out’ at the command line. //Generate Assembly listing by entering ‘gcc -S P1-3B.c P1-3BASM.s’ //Open the generated equivalent Assembly file ‘P1-3B.s’ and fulfill part 3B requirements. #include unsigned char next_char(char in); void main() { printf(“Next Character= %c ”,next_char(‘A’)); } Put the following Assembly source code into its own P1-3BASM.s file… //Assembly Subroutine //Eugene Rockey, Copyright 2018, All Rights Reserved .section “.text” .global next_char next_char: ADD r0,#1 //How is the ARM calling convention obeyed here? MOV pc,lr .end This document is subject to change.

$25.00 View

[SOLVED] Cecs 220 assignment 5 1. (20 points) solve the following problem (ch. 11). write a program to enter employee data

1. (20 points) Solve the following problem (Ch. 11). Write a program to enter employee data including his or her name, Social Security number, and salary, into an array.The maximum number of employees is 100, but your program should also work for any number of employees less than 100. Your program should use two exception classes, one for the case when the Social Security number length is not exactly nine characters (without dashes or spaces), and another when the Social Security number includes any character that is not a digit, as defined below.(a) Create a class called Employee which has three instance variables, Name, Salary, and SSNumber. The Employee class has one constructor that accepts values for initializing the Name, Salary, and SSNumber. Include accessor methods, mutator methods, equals method and toString method. The constructor method, or the mutator method for the SSNumber, should throw exceptions when a Social Security number does not satisfy the required format. The equals method returns true if the two employee objects have either the same name or the same Social Security number, and false otherwise.(b) Define two exception classes. One is called SSNLengthException, for the case when the Social Security number entered without dashes or spaces is not exactly nine characters. The other is called SSNCharacterException, for the case when any character in the Social Security number is not a digit. The two exception classes should display appropriate messages, when they are thrown, telling the user what has been entered and why they were not appropriate.Write a client class, called EmplyeeBuilder, that builds a list of Employee objects, using an array of maximum size of 100. The client allows a user to enter values for an employee. The client class catches and handles the exceptions if they are thrown due to creating unacceptable Employee object that does not satisfy the Social Security number format. Besides, the program should not allow two employees of the same name or Social Number to be added to the built list of Employee objects. No employee record should be added to the list if it does not satisfy the conditions. After all data has been entered, your program should display the records for all employees, with an annotation stating whether the employee’s salary is above or below average.2. (10 points, optional bonus problem) Write a JavaFX application that calculates the registration fees for a conference. The general conference fee is $800 per person, and student registration is $450 per person. There is also an optional opening night dinner with a keynote speech for $30 per person. In addition, the optional preconference workshops listed below are available.Workshop Fee Introduction to E-commerce $350 The Future of Web $300 Advanced Java Programming $400 Network Security $450The application should allow the user to select the registration type using two radio buttons, the optional opening night dinner using a check box, and one preconference workshop as desired using either a choice box, a spinner, or a list view. The total cost should be displayed on the screen window.Submission Requirements: Your presentation in your report reflects great deal about you, your understanding of the assignment and on how much this course means to you. I try very hard to look at the substance of the report but I will be lying if I said that presentation does not influence my judgment. So, I expect your reports to be well organized and conform to the following rules:All reports must be submitted in PDF format. Each assignment should contain the following: 1. Title page with your name, assignment number and the day you are actually submitting this report (Not the assignment due date).2. A brief description of your solution of each problem of the assignment separately, you can also explain your solution using a pseudocode. Number your descriptions according to the problem numbers. 3. A comprehensive set of snapshots showing the inputs submitted, outputs obtained in the case of a successful output or a failure, including required output formatting, prompts, and messages. 4. Java source files that contain your solutions. It must be a “*.java” file. Source programs should contain meaningful comments and variable names.5. Please zip both the PDF document with the source code and submit one zipped file. Please name your zipped file as “HWx_firstname_lastname.zzz”. Where, “firstname” and “lastname” refer to your first and last names, “x” refers to the homework number (e.g., 1, 2, etc), “zzz” refers to the file name extension for the software used for archiving.6. Submissions after the due date are accepted with a penalty of 25% per day (weekend days are counted as one-day delay). Grading Table Summary Problem Item PointsProblem 1 (20 points) Report (Description of solution, and pseudocode) 2.0 Output snapshots (input/output, formatting) 1.0 Java Source Code Implementation Exception classes 1.0 Employee Class 9.0 EmployeeBuilder Class 7.0 Bonus Problem 2 (10 points) Report (Description of solution) 1 Output snapshots (input/output, formatting) 1 Java Source Code Implementation Correct implementation satisfying requirements 8 Total 30

$25.00 View

[SOLVED] Cecs 220 assignment 4 1. (12 points) solve the following problem. (a) define an abstract class, called utilitycustomer

1. (12 points) Solve the following problem. (a) Define an abstract class, called UtilityCustomer, that has one Integer instance variable, an account number, and an abstract method, called calculateBill, that returns the bill amount as double.The UtilityCustomer class implements the Comparable interface, and includes a constructor that is passed a parameter for initializing the instance variable. It includes also accessor and mutator methods for the instance variable, and a toString method that returns a string for displaying the account number. The UtilityCustomer class has two non-abstract subclasses that inherit from the UtilityCustomer: GasCustomer and ElectricCustomer.(b) GasCustomer class has two additional fields, the cubicMetersUsed instance variable, and a constant for the price of gas per cubic meter of $2.75. Include appropriate constructor for initializing the class instance variable, accessor and mutator methods for class’s instance variable, and implement the calculateBill method. Write a toString method, that calls the toString method of the UtilityCustomer a formatted string to display the gas customer’s account number, the gas consumption, and the amount charged.(c) ElectricCustomer class has three additional fields, kWattHourUsed instance variable, along with two constants, one for the price of electricity per kilowatt hour, and the other for a flat power delivery fee of $30 that is added to every bill. Include appropriate constructor for initializing the class instance variable, and accessor and mutator methods for class’s instance variable. Write a toString method, that calls the toString method of the UtilityCustomer, and implement the calculateBill method.(d) Write a client class, called CollectionOfUcustomers, that maintains a list of UtilityCustomer objects created by a user. The client class prompts a user for the type of a UtilityCustomer and its corresponding parameters to create. The program allows the user to specify up to 10 UtilityCustomer objects to be stored in an array.The program should display the information of UtilityCustomer objects in descending order based on their account numbers.2. (8 points) Write a JavaFX application that allows a user to enter the food charge for a meal at a restaurant using a text field. The application provides the user with four options for tip percentages to select from: 0%, 15%, 18%, and 20%. You can use controls for determining the tip percentage such as radio buttons, or choice box.The application provides a button that is used to calculate and display the amount of tip on the meal charge, an 8% sales tax amount, and the total of all three amounts using Text objects. You can choose any layout to organize the control elements. (Note: Radio buttons are introduced in section 5.10, and choice boxes are introduced in section 8.9.)Submission Requirements: Your presentation in your report reflects great deal about you, your understanding of the assignment and on how much this course means to you. I try very hard to look at the substance of the report but I will be lying if I said that presentation does not influence my judgment. So, I expect your reports to be well organized and conform to the following rules:All reports must be submitted in PDF format. Each assignment should contain the following: 1. Title page with your name, assignment number and the day you are actually submitting this report (Not the assignment due date).2. A brief description of your solution of each problem of the assignment separately, you can also explain your solution using a pseudocode. Number your descriptions according to the problem numbers. 3. A comprehensive set of snapshots showing the inputs submitted, outputs obtained in the case of a successful output or a failure, including required output formatting, prompts, and messages.4. Java source files that contain your solutions. It must be a “*.java” file. Source programs should contain meaningful comments and variable names.5. Please zip both the PDF document with the source code and submit one zipped file. Please name your zipped file as “HWx_firstname_lastname.zzz”. Where, “firstname” and “lastname” refer to your first and last names, “x” refers to the homework number (e.g., 1, 2, etc), “zzz” refers to the file name extension for the software used for archiving.6. Submissions after the due date are accepted with a penalty of 25% per day (weekend days are counted as one-day delay). Grading Table SummaryProblem Item Points Problem 1 Report (Description of solution, discussion, & analysis) 1 Output snapshots (input/output, formatting) 1 Java Source Code Implementation UtilityCustomer Class 2 GasCustomer Class 2 ElectricCustomer Class 2 CollectionOfUcustomers Class 4 Problem 2 Report (Description of solution, discussion, & analysis) 1 Output snapshots (input/output, formatting) 1 Java Source Code Implementation start Method 4 Handler Methods 2 Total 20

$25.00 View

[SOLVED] Cecs 220 assignment 3 1. (20 points) solve the following problem (a) when a new user logs in for the first time on a website

1. (20 points) Solve the following problem (a) When a new user logs in for the first time on a website, the user has to submit personal information such as user_id, password, name, email address, telephone number, and so forth. Typically, there are two fields for passwords, requiring the user to enter the password twice, to ensure that the user did not make a typo in the first password field.Write a class encapsulating the concept of processing a form, called ProcessForm, with the following elements: User_id, name, password, re-enter password, email address, and telephone number. The ProcessForm class has one instance variable, called UserInfo. It is an array of 6 elements (in this case) of Strings, containing the user’s personal information elements. The ProcessForm class contains the following methods: A constructor with one parameter, that is a one dimensional array of 6 words representing the user’s information, used to initialize the ProcessForm class instance variable. The constructor must check that the passed array length matches the array length of the instance variable. If the two arrays do not have the same length, the instance variable array elements are initialized with empty strings, and warning message is displayed on the screen. Accessor method, getUserInfo, that returns an array of Strings for the user’s information.  A method, called SetInfo, that accepts two parameters to set or update an element of the UserInfo array, a string value and an index related to the position of the element in the array.  toString method that returns a string of the user’s information nicely formatted, containing all the personal information in a printable form. However, the user’s password elements should be hidden. A method, called CheckPasswords, which checks if the two Strings representing the passwords are identical. If they are, it returns true; if not, it returns false. A method, called CheckEmailAdd, which used to check if the String representing the email address actually “looks like” an email address. For simplicity, we assume that an email address contains one and only one “@” character, and contains one or more periods after the @ character. The method returns true if the email address element looks like a valid one; otherwise, it returns false. A method, called CheckPhone, which is used to check if the String representing the phone number satisfies the format of a phone number in North America. The phone number format is specified as follows: Local number (7-digits subscriber): Nxx-xxxx, where N is for digits 2-9. Domestic (10-digits): NPA-Nxx-xxxx, where NPA refers to 3-digit area code. The method returns true if the phone number element is valid; otherwise, it returns false. .(b) Write a client class, called Website_User, that allows a user to enter his/her personal information for a website. The program should prompt the user to enter each data element. The entered information is used to create an object of the ProcessForm class. Accordingly, the client program should check the validity of user’s password, email address, and phone number, and allow the user to reenter each invalid information till a valid one is accepted. Finally, the program should display the user’s information on the screen.Report and Program Submission Guidelines It is expected that your report to be well written and organized. The report reflects your understanding of the assignment and its solution. So, you must assume that your marks assigned to the report part is related to how is the report is written and presented. All reports must be submitted in PDF format. Each assignment should contain the following:1. Report 1.1. Title page with your name, assignment number and the day you are actually submitting this report (Not the assignment due date).1.2. A brief description of your solution of each problem of the assignment, you can also explain your solution using a pseudocode. Number your descriptions according to the problem numbers. 1.3. A comprehensive set of snapshots showing the inputs submitted, outputs obtained in the case of a successful output or a failure, including required output formatting, prompts, and messages.2. Submission Procedure: 2.1. Java source files that contain your solutions. They must be a “*.java” files. Source programs should contain meaningful comments and variable names.2.2. Please zip both the PDF document with the source codes and submit one zipped file. Please name your zipped file as “HWx_firstname_lastname.zzz”. Where, “firstname” and “lastname” refer to your first and last names, “x” refers to the homework number (e.g., 1, 2, etc), “zzz” refers to the file name extension for the software used for archiving.2.3. Submissions after the due date are accepted with a penalty of 25% per day (weekend days are counted as one-day delay). Grading Table Problem Item Points Problem 1 Report (Description of solution) 2 Output snapshots (input/output, formatting) 1 Java Source Code Implementation ProcessForm Class 12 Website_User Class 5 Total 20

$25.00 View

[SOLVED] Cecs 220 assignment 2 1. (12 points) solve the following problem (a) write a class called babysittingjob

1. (12 points) Solve the following problem (a) Write a class called BabysittingJob that represents the concept of a babysitting service. The class contains the following instance variables: A job number that contains six digits. The first two digits represent the year, and the last four digits represent a sequential number. For example, the first job in 2019 has a job number of 190001.  A code representing the employee assigned to the job. Assume that the code will always be 1, 2, or 3. A name based on the babysitting code. Assume the service currently has three babysitters: (1) Cindy, (2) Greg, and (3) Marcia. The number of children to be watched. Assume that this number is always greater than zero.  The number of hours in the job. Assume that all hour values are whole numbers. The fee for the job is based on the babysitter and the number of children are watched. Cindy is paid $7 per hour per child. Greg and Marcia are paid $9 an hour for the first child, and $4 per additional hour for each additional child. For example, if Greg watches three children for two hours, he makes $17 per hour, or $34 for the two hours.Create a constructor for the BabysittingJob class that accepts arguments for the job number, babysitter code, number of children, number of hours. The constructor determines the babysitter name and fee for the job. Also include a toString method that returns a nicely formatted string containing the details of a babysittingJob object.(b) Write a client class that prompts the user for entering the data for a babysitting job. The application should keep prompting the user for each of the following values until they are valid:  A four-digit year between 2019 and 2025 inclusive.  A job number for the year between 1 and 9999 inclusive.  A babysitter code of 1, 2, or 3.  A number of children for the job between 1 and 9 inclusive.  A number of hours between 1 and 12 inclusive.When all the data entries are valid, construct a job number from the last two digits of the year and a four-digit sequential number, which might require adding leading zeros. Accordingly, create a BabysittingJob object, and display its values.2. (8 points) Solve the following JavaFX application. Write a JavaFX application that analyzes a word. The user would type the word in a text field, and the application provides three buttons for the following:  One button, when clicked, displays the length of the word. Another button, when clicked, displays the number of vowels in the word.  Another button, when clicked, displays the number of uppercase letters in the word. (Hints: Use the GridPane or HBox and VBox to organize the GUI controls. See the Listings 4.8, 4.9, and 5.12 for related examples.)Report and Program Submission Guidelines It is expected that your report to be well written and organized. The report reflects your understanding of the assignment and its solution. So, you must assume that your marks assigned to the report part is related to how is the report is written and presented. All reports must be submitted in PDF format. Each assignment should contain the following:1. Report 1.1. Title page with your name, assignment number and the day you are actually submitting this report (Not the assignment due date).1.2. A brief description of your solution of each problem of the assignment, you can also explain your solution using a pseudocode. Number your descriptions according to the problem numbers. 1.3. A comprehensive set of snapshots showing the inputs submitted, outputs obtained in the case of a successful output or a failure, including required output formatting, prompts, and messages.2. Submission Procedure: 2.1. Java source files that contain your solutions. They must be a “*.java” files. Source programs should contain meaningful comments and variable names.2.2. Please zip both the PDF document with the source codes and submit one zipped file. Please name your zipped file as “HWx_firstname_lastname.zzz”. Where, “firstname” and “lastname” refer to your first and last names, “x” refers to the homework number (e.g., 1, 2, etc), “zzz” refers to the file name extension for the software used for archiving.2.3. Submissions after the due date are accepted with a penalty of 25% per day (weekend days are counted as one-day delay). Grading Table Problem Item Points Problem 1 Report (Description of solution) 2 Output snapshots (input/output, formatting) 1 Java Source Code Implementation BabysittingJob class 5 Client Class 4 Problem 2 Report (Description of solution) 1 Output snapshots (input/output, formatting) 1 Java Source Code Implementation Start method 4 Handler methods 2 Total 20

$25.00 View

[SOLVED] Cs211 mini-project 2 write a menu driven application that is going to use the hierarchy t

Write a menu driven application that is going to use the hierarchy that you have written for homework 8 and the functions that you have written for homework 9. You will keep track of the collection of Files in a vector of File pointers (File pointers, since File is an abstract class). The menu should contain the following options:Here are the contents of the file.txt that you can use for testing purposes. txtstudents500 txtfiles120 gifpicture1100 x 2008 gifpicture2200 x 30016 txttestfile450 Submit your project to your lab instructor. 

$25.00 View

[SOLVED] Cs211 project 1 implement a roster management program using the classes

Implement a Roster Management Program using the classes that you developed in homework assignments 2-6. The program should be command-line interfaced.In Roster Management Program you will have two Modes: “Supervisor Mode” and “User Mode”. In “Supervisor Mode” you have options to:In a “User Mode” you can only do the following: 1) Select a Roster to perform following operations: a) Insert new Student to a Roster b) Remove a Student from a Roster c) Update a Student in a RosterIn Main menu you will have following options: A) Supervisor Mode that will be password protected. The user can be authenticated against a database.txt file entries which would contain user/password pair B) User Mode C) ExitNote: When you start off the program the rosters must be read in from a file called rosters.txt. When you exit a program the rosters must be stored back to a file called rosters.txt. Internally in your program rosters are stored in a growable array of rosters. The format of the rosters.txt file is: course1-name | course1-code | number-credits | professor-name student1 first name | student1 last name|sid|standing|credits|gpa|mm/dd/yyyy|mm/dd/yyyy student2 first name | student2 last name|sid|standing|credits|gpa|mm/dd/yyyy|mm/dd/yyyy end_roster| course2-name | course2-code | number-credits | professor-name student1 first name | student1 last name|sid|standing|credits|gpa|mm/dd/yyyy|mm/dd/yyyy end_roster|

$25.00 View

[SOLVED] Cs211 homework 9 the aim of this homework assignment is to practice writing recursive functions.

The aim of this homework assignment is to practice writing recursive functions.For this homework assignment write two recursive functions:The first one receives a vector of File pointers and recursively outputs properties of every file stored inside this vector.The second function receives a vector of File pointers and a string which represents a type of the file (gif or txt). The function should return another vector of File pointers containing only Image files or Text files, depending on the second parameter. The function should be recursive.Please submit this assignment to your lab instructor.

$25.00 View

[SOLVED] Cs211 homework 8 design a hierarchy of files. you have two different kinds of files

Design a hierarchy of Files. You have two different kinds of Files, Text File and an Image File. The files are identified by their name and type, which is identified by either txt or gif extension. An Image file has dimensions of pixel rows and pixel columns. Each pixel has a color depth that can be represented by number of bits. (8 bits is one byte).A Text file is a plain ASCII file that contains characters. Each character is represented by 8 bits. You should provide a function getSize that returns size of a file. Size of a file is measured in bytes. The size of an Image file is calculated by finding how many pixels are needed to store a file multiplied by number of bits to color a single bit divided by 8. The size of the Text file is calculated by counting number of ASCII characters stored in a file.Provide a function to display properties of a File. Properties include: type, name, size, dimensions and color depth for an Image File, characters for a Text File. Provide functions to return type and names of files. Provide function to retrieve character count for a Text file. Provide functions to retrieve dimensions and color depth of an Image File.Write .h and .cpp files for File, Image, and Text classes.Please submit this assignment to your lab instructor. 

$25.00 View

[SOLVED] Cs211 homework 7 the aim of this homework assignment is to practice writing template classes.

The aim of this homework assignment is to practice writing template classes. You must use SafeArray template class and implement a SafeMatrix template class that will allow you to work with two dimensional arrays of any type. The boundaries are checked. You must be able to create instances of SafeMatrix template class like,SafeMatrix m(2,3);The above statement will create a 2 by 3 dimensional array of integers. You must be able to access and set values using bracket operators. For example m[0][1] = 5; will set element at row 0 column 1 to an integer value 5. You must be able to return dimensions of the array as follows: m.length() will return the number of rows in your 2D array. m[0].length() will return number of columns in row number 0. Provide all necessary functions to your template class. Write a Driver program that tests your template class with at least two different types.

$25.00 View

[SOLVED] Cs211 homework 6 modify your roster class so that it will now store a dynamic array of pointers

Modify your Roster class so that it will now store a dynamic array of pointers to Student objects. The Roster is identified by the course name, course code, number of credits, instructor name, and contains a list of students stored in an array of pointers to Students.The array must have the ability to grow if it reaches the capacity (for that provide a private function grow ()). Modify your functions to add a student to a Roster, delete student from a Roster, and search for a student to reflect the changes.Overload [] operator to return immutable Student object at a particular location. Include the “big-three” that are needed when there is a dynamic allocation within a class.Submit your homework to your recitation instructor. 

$25.00 View

[SOLVED] Cs211 homework 5 modify your student class to overload the following operators: ==, !=, , = as member operators.

Modify your Student class to overload the following operators: ==, !=, , = as member operators. The comparison operators will compare students by last name first name and id number. Also, overload > as friend operators in the Student class.Overload > operators in Roster class as well to output Rosters in a nice format as well as input Roster. Provide a function sort in a Roster class as a private function to sort out all the students in a Roster according to their Last Name, First Name, and Student id using the comparison operators that you overloaded in the Student class (We will go over a simple selection sort on integers either in the lab or the lecture).Overload > operators in Date class that I provided for you. Change the date of birth and date of matriculation in the Student class from string to an instance of Date object. Change the functions and constructors in the Student class to set and get the Dates as Date objects rather than strings.Write a driver program to test your functions.Submit your homework to your lab instructor.

$25.00 View

[SOLVED] Cs211 homework 4 the aim of this homework assignment is to practice using a class written by someone else

The aim of this homework assignment is to practice using a class written by someone else and use dynamic allocation. This homework assignment will also help build towards project 1, which will be to write a program implementing the Roster Management Program. For this assignment, write a program that uses the class Date. As an added challenge, I will not provide you with the .cpp file for this class, rather, only the .o file, to which you can link your program for testing purposes. Write a program that does the following:Note that you do not need to know the implementation of the Date class.In order to compile your program and link it to my Date class you will need to do the following: 1. Before you begin writing any program, make a copy of the Date.h file into your directory. Do this by typing the following (note the . at the end): cp ~alayev/cs211/fall2022/hw4/Date.h . 2. Write your program. 3. Compile your program using the following (to link to my .o file) g++ main.cpp ~alayev/cs211/fall2022/hw4/Date.oNote that you may copy the Date.o file to your local directory; however, this is not necessary, and will use up valuable space on your venus/mars account. Note further that this .o file will only work on venus/mars, it will not work on other UNIX systems or on Windows. Submit this program to your lab instructor following his instructions. If you find any bugs with the code, please do not hesitate to e-mail me.      /* Date.h * * Declaration of the class that holds a date, * which is a month-day-year combination. * * Author: Yosef Alayev */ #ifndef DATE_H #define DATE_H #include using namespace std; class Date { public: // Initializes a date to the default value of January 1, 1970. Date();// Initializes a date to the values in the parameters.  If the //date is not legal, sets the date to one of the legal values. Date(int m, int d, int y);// Returns the month stored by the class string getMonth() const;// Returns the month stored by the class as a number int getMonthNum() const;// Returns the day stored by the class int getDay() const;// Returns the year stored by the class int getYear() const;// solicit the date from the user void input();// output the date in a nice format void output() const;private: int month, day, year; void adjust(); }; #endif

$25.00 View

[SOLVED] Cs211 homework 3 write a class roster that is identified by the course name, course code

Write a class Roster that is identified by the course name, course code, number of credits, instructor name, and contains a list of students stored in an array. For now you can use stack allocated array of MAX_CAPACITY=10 (define MAX_CAPACITY as a macro in the .h file). Later we will make this array dynamic to allow it to grow.Provide necessary constructors, accessor functions for each member, and mutator functions for each member. Provide a function to add a student to a Roster, delete student from a Roster, and search for a student. Provide a function to output all Students from a roster to console in a nice format.For now you should not worry about the order of Students in your Roster. They do not need to be sorted.Write a driver program to test your Roster class. Use declare/define/use approach Submit the assignment to your lab instructor.

$25.00 View

[SOLVED] Cs211 homework 2 this homework assignment will help build towards project 1

This homework assignment will help build towards project 1, which will be to write a program implementing Management of Rosters System.For this assignment, write a class called Student. This class should contain information of a single student. This information includes:last name, first name, standing, credits, gpa, date of birth, matriculation date.For now you can store date of birth and date of matriculation as strings. Your class should support the following functions:Make sure that the standing is set based on credits and not passed in as a parameter. When you call mutator function on credits, or initialize an object in a constructor, or through input function, that is where the standing is set. Standing is:Lower Freshman         0

$25.00 View