Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [homework]

Questions requesting help with school homework. This tag lets potential answerers know that they should GUIDE the student in solving the problem, rather than showing a complete solution. CAUTION: Before posting, consider that classmates may be tempted to reuse code from your post. (Read the tag wiki.)

Filter by
Sorted by
Tagged with
2 votes
1 answer
41 views

Changing the attributes of a file

I wrote a program that changes the attributes of a file. How can I make the program more efficient? Please find program problems. How can I improve the program? ...
user avatar
  • 51
-1 votes
1 answer
69 views

Need to make my Tictactoe Game better (Java) [closed]

I need some help with a school-project that I have! My code is very unnecessarily long, and I know that there is better ways to write it. So I have this code (generated code is not included & some ...
user avatar
0 votes
0 answers
33 views

Calculate the number of burgers that can be made from the given ingredient inventory [closed]

Posted this on Stack Overflow and got recommended over here. I have, so far, found no errors in the code but it looks a bit complicated and I would like some feedback. This is my second project in my ...
user avatar
11 votes
3 answers
1k views

Toggle 2 LEDs using a timer XMEGA-A3BU Xplained

I’m currently taking an online embedded programming course. This was our 4th programming assignment. The device is Microchip(Atmel) XMEGA-A3BU Xplained Development Kit, Mfr. Part Number: ATXMEGAA3BU-...
user avatar
  • 18.3k
4 votes
1 answer
177 views

Create and view a family tree

I have an assignment due Friday to make a family tree. Started to code in January. My reviews from the teacher for this code was that the use of pointers was horrendous and it wasn't OOP enough. This ...
user avatar
  • 43
4 votes
1 answer
88 views

Case-insensitive sort in C

I wrote a sorting program so that if the optional argument -i is present then the sorting should be done without taking into account lowercase / uppercase letters. ...
user avatar
  • 179
0 votes
0 answers
35 views

MTD-F Implementation in Othello

I currently am using the MTD-f algorithm, along with a hybrid negamax/negascout with memory function, in an Othello implementation: ...
user avatar
  • 101
3 votes
2 answers
55 views

change file attributes on a Linux file system with chattr

I am reading the book The Linux Programming Interface and I have reached the exercise in which the implementation of the chattr command in C is required. I would ...
user avatar
  • 51
4 votes
3 answers
95 views

Analyzing baby name data in CSV files

First time using code review. I am still a student so there will be a lot to be desired. Basically as part of the homework we are told what methods to create (Method names are given with their ...
user avatar
2 votes
1 answer
101 views

Implementation of an algorithm to calculate a check digit for a five-digit number

I'm a newbie in programming, just started about 6 months ago and just finding my way around in C# (clean) code. This is the toy task we have received from our teacher. This is what it should do: New ...
user avatar
  • 23
4 votes
4 answers
295 views

Making a list of length X with each cell being a list of length Y

My teacher gave us an assignment to write a function that gets as arguments an x and a y. It returns a list which is of length <...
user avatar
2 votes
2 answers
90 views

Input validation that verifies a boolean assignment using a Boolean object

Taking online college course and I'm new to Java. We just learned about input validation. I've used input validation pretty comfortably for strings, ints, and whatnot. But I had to validate a boolean ...
user avatar
3 votes
1 answer
76 views

ATM Console Program with Java

I am a freshman Computer Engineering student. Variable names are pretty straightforward; I believe it would be easy to understand. Program explanation: First you have to create an account and deposit ...
user avatar
0 votes
2 answers
116 views

Searchable database with Java and SQL

What does the code do? Albeit unfinished (it does work, it's just not complete yet), the code creates a database (members.db) where telephone numbers, IDs, and ...
user avatar
  • 119
1 vote
1 answer
88 views

Simple school bank project in C++

What is your opinion on this simple school project exercising OOP in C++? ...
user avatar
2 votes
1 answer
131 views

Java implementation of Employee class hierarchy

We were tasked to do this assignment where there is the base class employee and two derived class part-time and full-time employees. Here is what I came up with: ...
user avatar
1 vote
1 answer
83 views

Java implementation of Yahtzee

I'm trying to implement the game of Yahtzee in java. This is for a project at my university so I tried to be as clean and to use the best code practices as possible. The part in particular that I ...
user avatar
2 votes
2 answers
318 views

A monthly expenses calculator for an assignment

I've been working on this project for a day. Any feedback on the code would be appreciated. The code is for an assignment. The main concern I have with the project is that I'm not using abstract ...
user avatar
  • 21
1 vote
1 answer
68 views

Python module to generate context for Django template using data requested from API

As part of a university assignment, I have been tasked with populating and rendering a provided Django template with COVID-19-related quarantine data retrieved from a government API. To challenge ...
user avatar
  • 15
1 vote
2 answers
86 views

It is considered a daemon if it runs in the background - creating a daemon in C

I created a daemon that creates a fifo file with a default name, then is been blocked waiting for messages on that fifo. When an interactive process writes data to that fifo, the daemon wakes up and ...
user avatar
  • 1
2 votes
1 answer
74 views

program that implements the `mkdir` command

I wrote a program that creates a directory, similar to the mkdir command. My question is, is this implementation correct? What else could I improve or what problems ...
user avatar
  • 1
1 vote
1 answer
118 views

What are the issues with implementing the Shortest Job First algorithm?

I wrote a program that implements the Shortest Job First (SJF) scheduling algorithm. The total number of processes is read directly from the standard input, following that for each process to specify ...
user avatar
  • 1
0 votes
1 answer
160 views

Round Robin algorithm implementation

I wrote a program that implements the Round Robin planning algorithm. The total number of processes is read directly from the input standard, and for each process the arrival time and execution time ...
user avatar
  • 1
5 votes
1 answer
141 views

Space Invaders clone for a college project

Edit: the project was submitted, and I got a good grade! :D I am finishing up a project for my computer science class. The project is a space invaders clone that uses the JavaFX library to provide ...
user avatar
3 votes
1 answer
120 views

Generate and display usernames

Everything currently works exactly as requested by the instructor, I've included as much possible commented documentation as I can think of to make it easier for people to see what the required ...
user avatar
1 vote
1 answer
126 views

Evaluating infix expression with brackets

My assignment was to write a function that computes the value of an expression written in infix notation. We assume that we are using the four classical arithmetic operations +, -, * and / and that ...
user avatar
3 votes
1 answer
265 views

Monte Carlo Simulation of 7 Card Stud Poker

I've completed this as part of an online programming course (in which code review is supposed to be done by fellow learners, but it's been a very long time and none of them have reviewed this), and ...
user avatar
  • 33
4 votes
2 answers
676 views

Read bills from a bills.csv file

I wrote the following code to read out a bill from a file and then putting it into a bills-list. The bill contains: "company", "customer", Year, Month, Day, Amount, "credit/...
user avatar
1 vote
1 answer
124 views

Python Fasta Parser using dictionaries without using BioPython or other external libraries

I am writing my own parser for fasta format. I can't use Biopython or anything else, because it's a part of an assigment and our teacher wants us to try to do it manually. For now, I have done this: <...
user avatar
2 votes
2 answers
73 views

Java BMI Calculator [closed]

I'm learning java this week. Please reviews my code for BMI calculator using java, need some your feedback. Thanks before! This Assignment: My code ...
user avatar
1 vote
2 answers
104 views

Generate a string that is not present in a list

For a college assignment, I was tasked with the following (excerpt from provided code file): Find one string of characters that is not present in the list. You are provided a function that loads the ...
user avatar
  • 9,476
7 votes
1 answer
113 views

Output number densities in model atmosphere of the Sun

I have completed my Python project which calculates and outputs the number densities of dozens of different species (over 11 chemical elements total) in a model atmosphere of the Sun. The code reads ...
user avatar
  • 199
2 votes
2 answers
173 views

Print a Connect 4 board

I am required to code (as part of a 3-question assignment) a variable-size connect 4 board with a standard size of 6x7, with a minimum size of 2x2 and a maximum of 20x20. The professor said that he ...
user avatar
  • 21
4 votes
3 answers
329 views

FIFO array/queue

I'm new to programming and was tasked with programming a generic circular FIFO queue, without using anything but an underlying array and self-programmed methods. I still don't know how to approach ...
user avatar
2 votes
1 answer
286 views

Create a Time class - OOP in Python

Create a Time class. Time is on my side Specification Basic attributes: hour, minute, second and day (default is 0), + getters, + setters (using a decorator) If ...
user avatar
2 votes
1 answer
116 views

Python Text-Based Hangman Game

I have just written a hangman game in Python for a school project. It reads in a list of words from a text file, and graphics from another text file. For each word, the program asks keeps asking for ...
user avatar
1 vote
1 answer
89 views

C code in Data structures

Can someone give me any suggestions over my code that I made for this task? Also how much of 10 would rate it ? Suppose a simply linked list whose node is of type node and contains a student's name, ...
user avatar
1 vote
1 answer
73 views

Car price calculator

Im writing this simple program for school and using NumberFormat on all the variables seems very repetitive (Note that we were asked to use the NumberFormat method)....
user avatar
0 votes
2 answers
85 views

How to replace the given email address with a value in a given input?

I have written the below method to replace some of the email domains like @gmail.com and @yahoo.com with a given text. ...
user avatar
1 vote
3 answers
166 views

Value store ("optional" type)

Create a class template named ValueStore that has a member variable, to store a value and a member variable, hasValue that holds ...
user avatar
5 votes
1 answer
633 views

Parsing and Simple Shell in C

I wrote this simple shell in C for a university assignment on operating systems (My guess is that it's just the beginning and the next assignments will add to this code). The program prints the prompt ...
user avatar
  • 181
2 votes
1 answer
577 views

Customer management system for registering customers in C

The prompt is: that I should write a program for a customer management system for registering customers (in C programming language). The program should allow registration management members to: Add ...
user avatar
  • 21
3 votes
1 answer
120 views

Date program for xv6- improvement and testing

This is my first post on this forum. I have read the guidelines and will try to adhere to them, but I apologize if I miss something. The code I am posting is intended to duplicate the output of &...
user avatar
4 votes
1 answer
89 views

Binary guess game in C++

This is a program in C++ that guesses a number given by the user. I have to do homework and there's my attempt to solve an exercise from the programming book. If you know what can be done better and ...
user avatar
-1 votes
2 answers
82 views

Remove duplicates from array and save it to another one [duplicate]

I have been tasked to make an array without duplicated values from another existing array. So I did it, but I want to know is there some other better way to do that. Example input/output ...
user avatar
3 votes
3 answers
145 views

Remove duplicates from array and save it to another one

So I have been tasked to make an array without duplicated values from another existing array. So I did it, but I want to know is there some other better way to do that. Example input/output: ...
user avatar
8 votes
1 answer
99 views

Parenthesis-realigning program

This is my code for an assignment. The task is to take a user input in form of a sequence of parenthesis' followed by an E to mark its end and determine whether it is a correct sequence (as an example ...
user avatar
4 votes
4 answers
1k views

Tax Calculator (using OOP techniques)

I was wondering if you'd be able to review my basic Tax Calculator that incorporates OOP techniques. I'd greatly appreciate it if you didn't mention about my variable naming convention i.e. Hungarian ...
user avatar
5 votes
1 answer
80 views

Find all the digits in a string

S is a given character string, then I have to find all the digits characters of S. Did I make it unnecessarily complicated? <...
user avatar
6 votes
1 answer
80 views

Given a byte string S of length l, obtain the string D of length l-1 as D(i) = S(i) * S(i+1)

Given a byte string S of length l, obtain the string D of length l-1 as D(i) = S(i) * S(i+1) (each element of D is the product of two consecutive elements of S). ...
user avatar

1
2 3 4 5
11